mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 12:43:31 +03:00
37 lines
539 B
C
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;
|
|
}
|