shrub/j/5/mule.c

26 lines
555 B
C
Raw Normal View History

2014-08-20 10:22:41 +04:00
/* j/5/mule.c
2014-05-19 03:16:01 +04:00
**
** This file is in the public domain.
*/
#include "all.h"
2014-09-04 07:10:43 +04:00
2014-05-19 03:16:01 +04:00
2014-09-06 00:13:24 +04:00
u3_noun
u3_cwe_mule(u3_noun cor)
2014-05-19 03:16:01 +04:00
{
2014-09-06 00:13:24 +04:00
u3_noun tap;
2014-05-19 03:16:01 +04:00
2014-09-06 00:13:24 +04:00
if ( u3_no == u3_cr_mean(cor, u3_cv_sam, &tap, 0) ) {
return u3_cm_bail(c3__exit);
2014-05-19 03:16:01 +04:00
}
else {
2014-09-06 00:13:24 +04:00
u3_noun hok = u3_cj_hook(u3k(cor), "mute");
2014-08-20 10:22:41 +04:00
2014-05-19 03:16:01 +04:00
/* this takes advantage of the fact that mute's result, at the typeless
* C/Nock level, is identical to what a typed mule would produce,
* without running the formula twice.
*/
2014-09-06 00:13:24 +04:00
return u3_cn_slam_on(hok, u3k(tap));;
2014-05-19 03:16:01 +04:00
}
}