[Haskell] purely functional lazy non-deterministic programming