mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 12:43:31 +03:00
34 lines
634 B
C
34 lines
634 B
C
/* j/6/sift.c
|
|
**
|
|
** This file is in the public domain.
|
|
*/
|
|
#include "all.h"
|
|
|
|
|
|
/* boilerplate
|
|
*/
|
|
u3_noun
|
|
u3_cwfu_sift(
|
|
u3_noun cor)
|
|
{
|
|
u3_noun sut, ref, van;
|
|
|
|
if ( (u3_no == u3_cr_mean(cor, u3_cv_sam, &ref,
|
|
u3_cv_con, &van,
|
|
0)) ||
|
|
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
|
|
{
|
|
return u3_cm_bail(c3__fail);
|
|
} else {
|
|
return u3_cqfu_sift(van, sut, ref);
|
|
}
|
|
}
|
|
|
|
u3_noun
|
|
u3_cqfu_sift(u3_noun van,
|
|
u3_noun sut,
|
|
u3_noun ref)
|
|
{
|
|
return u3k(ref);
|
|
}
|