本文整理汇总了C#中Shelisp.LispEq方法的典型用法代码示例。如果您正苦于以下问题:C# Shelisp.LispEq方法的具体用法?C# Shelisp.LispEq怎么用?C# Shelisp.LispEq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shelisp
的用法示例。
在下文中一共展示了Shelisp.LispEq方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Feq
public static Shelisp.Object Feq(L l, Shelisp.Object o1, Shelisp.Object o2)
{
if (L.NILP(o1))
return L.NILP(o2) ? L.Qt : L.Qnil;
return o1.LispEq (o2) ? L.Qt : L.Qnil;
}
示例2: Eq
public static AssertResult Eq(Shelisp.Object o1, Shelisp.Object o2, string description = null)
{
try {
return (!o1.LispEq (o2)) ? Fail(description) : Succeed(description);
}
catch (Exception e) {
return FailException (e, description);
}
}
示例3: Memq
public static Shelisp.Object Memq(Shelisp.Object obj, Shelisp.Object alist)
{
Shelisp.Object tail = alist;
do {
if (obj.LispEq (L.CAR(tail)))
return tail;
tail = L.CDR(tail);
} while (L.CONSP (tail));
return L.Qnil;
}
示例4: Frassq
public static Shelisp.Object Frassq(L l, Shelisp.Object key, Shelisp.Object alist)
{
if (!L.CONSP(alist))
return L.Qnil;
//throw new WrongTypeArgumentException ("listp", alist);
foreach (var el in L.CONS(alist)) {
if (!L.LISTP(el))
continue;
if (L.NILP(el))
break;
var cdr = L.CDR(el);
if (key.LispEq (cdr))
return el;
}
return L.Qnil;
}
示例5: compare_eq
private static bool compare_eq(Shelisp.Object obj1, Shelisp.Object obj2, long hash1, long hash2)
{
return obj1.LispEq (obj2);
}
示例6: NotEq
public static AssertResult NotEq(Shelisp.Object o1, Shelisp.Object o2, string description = null)
{
return (o1.LispEq (o2)) ? Fail(description) : Succeed(description);
}