Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- fun {Prime I}
- local
- fun {Help I AD}
- if I<1 then false
- elseif AD<2 then true
- elseif I mod AD == 0 then false
- else {Help I AD-1}
- end
- end
- in {Help I I-1}
- end
- end
- {Show {Prime 0}}
- {Show {Prime 12}}
- {Show {Prime 31}}
Add Comment
Please, Sign In to add comment