Arc Forumnew | comments | leaders | submitlogin
1 point by povman 6140 days ago | link | parent

(Basically) the same program in Haskell (sans a couple of import statements):

  choices [] sofar = putStrLn (intercalate " " sofar)
  choices menu sofar = forM_ (head menu) (\item -> choices (tail menu) (item:sofar))
  main = choices [["small", "medium", "large"], ["vanilla", "ultra chocolate", "lychee", "rum raisin", "ginger"], ["cone", "cup"]] []
bring on the converts!