#!/usr/bin/env elixir defmodule Nemui do @nemui ~w(ね む い) def nemui() do nemui(zzz(), "") end def nemui(s, "いむね" <> _ = acc) do IO.puts acc |> String.reverse end def nemui(s, acc) do nemui(zzz(), s <> acc) end def zzz() do @nemui |> Enum.take_random(1) |> List.first end end Nemui.nemui()