DEV Community

Discussion on: Daily Challenge #40 - Counting Sheep

Collapse
 
thepeoplesbourgeois profile image
Josh • Edited

Oh, alright.

shep = fn
  0 -> ""
  n -> 1..n |> Stream.map(&("#{&1} sheep")) |> Enum.join("...") 
end

IO.puts(shep.(0))
#