diff --git a/implementations/C/joy.c b/implementations/C/joy.c index 5235dfa..0dec122 100644 --- a/implementations/C/joy.c +++ b/implementations/C/joy.c @@ -578,6 +578,16 @@ clear(JoyListPtr stack, __attribute__((unused)) JoyListPtr expression) } +void +dup(JoyListPtr stack, __attribute__((unused)) JoyListPtr expression) +{ + JoyList s = *stack; + JoyList node = pop_any(stack); + *stack = s; + push_thing(node->head, stack); +} + + void truthy(JoyListPtr stack, __attribute__((unused)) JoyListPtr expression) { @@ -614,16 +624,6 @@ truthy(JoyListPtr stack, __attribute__((unused)) JoyListPtr expression) } -void -dup(JoyListPtr stack, __attribute__((unused)) JoyListPtr expression) -{ - JoyList s = *stack; - JoyList node = pop_any(stack); - *stack = s; - push_thing(node->head, stack); -} - - JoyList def_abs_body; JoyList def_anamorphism_body; JoyList def_app1_body;