Skip to content

Instantly share code, notes, and snippets.

@lojikil
Created December 16, 2011 04:00
Show Gist options
  • Save lojikil/1484402 to your computer and use it in GitHub Desktop.
Save lojikil/1484402 to your computer and use it in GitHub Desktop.
/* compiler output */
SExp *member0_p (SExp *, SExp *);
SExp *
member0_p (SExp * x, SExp * l)
{
SExp *ret = nil, *x2 = nil, *l3 = nil;
int s1 = 1;
while (s1)
{
ret = SNIL;
SExp *condit4 = nil;
condit4 = eqp (l, SNIL);
if (condit4 == nil || condit4->TYPE == NIL
|| ((condit4->type == BOOL || condit4->type == GOAL)
&& condit4->object.c))
{
s1 = 0;
ret = SFALSE;
} else {
condit4 = eqp (car (l), x);
if (condit4 == nil || condit4->TYPE == NIL
|| ((condit4->type == BOOL || condit4->type == GOAL)
&& condit4->object.c))
{
s1 = 0;
ret = STRUE;
} else {
x2 = x;
l3 = cdr (l);
x = x2;
l = l3;
}
}
}
return ret;
}
;; source
(def (member0? x l)
(cond
(eq? l '()) #f
(eq? (car l) x) #t
else (member0? x (cdr l))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment