urbit/j/5/trip.c
2014-09-05 13:13:24 -07:00

37 lines
539 B
C

/* j/5/trip.c
**
** This file is in the public domain.
*/
#include "all.h"
/* functions
*/
u3_noun
u3_cqe_trip(u3_atom a)
{
if ( u3_no == u3ud(a) ) {
return u3_cm_bail(c3__exit);
}
return u3_cqc_rip(3, a);
}
u3_noun
u3_cwe_trip(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_trip(a);
}
}
u3_atom
u3_cke_trip(u3_noun a)
{
u3_atom b = u3_cqe_trip(a);
u3z(a);
return b;
}