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