Comment

Comment by shaicoleman

There are no code examples on the home page, so here's one:

    (defn bottles [n]
      (match n 
        0 "No more bottles" 
        1 "1 bottle" 
        _ (string n " bottles")))
    
    (loop [i :down [99 0]]
      (print 
        (bottles i) " of beer on the wall\n" 
        (bottles i) " of beer\nTake one down, pass it around\n" 
        (bottles (- i 1)) " of beer on the wall\n\n"))
https://rosettacode.org/wiki/99_bottles_of_beer#Janet
parent shaicoleman 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton