Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. fn divisible-by-3?
  2. 3 mod 0 =
  3. endfn
  4.  
  5. fn divisible-by-5?
  6. 5 mod 0 =
  7. endfn
  8.  
  9. fn and
  10. #_"Crappy Implementation of 'and"
  11. true =
  12. if
  13. true = if true else false then
  14. else
  15. drop false
  16. then
  17. endfn
  18.  
  19. fn fizzbuzz
  20. 1 do
  21. i divisible-by-3? i divisible-by-5? and if
  22. "FizzBuzz"
  23. else
  24. i divisible-by-3? if
  25. "Fizz"
  26. else
  27. i divisible-by-5? if
  28. "Buzz"
  29. else
  30. i
  31. then then then
  32. loop
  33. endfn
  34.  
  35. 100 fizzbuzz
Add Comment
Please, Sign In to add comment