main(){
[Int] l1 = 1 : 2 : 3 : 4 : 5 : [];
foldr(times, 1, l1);
+ print("faculty of 5 is: ");
+ print(foldr(times, 1, l1));
}
( mapM_ g es
>>| getAdressbook >>= \ab->(case 'Map'.get k ab of
Nothing = liftT (Left $ Error $ concat ["PANIC: ", k, " not found as function"])
- Just (LAB t _ _) = tell [Instr instr [L t] (k +++"()")]
- Just (ADDR t arity) = lift (Left $ Error "NO ADDRESS JUMPING FFS")
+ Just (LAB t _ _) = tell [Instr "bsr" [L t] (k +++"()")]
+ Just (ADDR t arity) = liftT (Left $ Error "NO ADDRESS JUMPING FFS")
+ )
>>| tell
[Instr "ajs" [Lit $ ~(length es)] "Clean arguments"
,Instr "ldr" [Raw "RR"] ""])