Skip to content

Instantly share code, notes, and snippets.

@chomado
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save chomado/357af01ab2b05ea94a23 to your computer and use it in GitHub Desktop.

Select an option

Save chomado/357af01ab2b05ea94a23 to your computer and use it in GitHub Desktop.
import Debug.Trace
fib :: Num a => [a]
fib = 0:1:(trace ("fib [" ++ show fib ++ "] + tail fib [" ++ show (tail fib) ++ "]")
(zipWith (+) fib (tail fib)))
main = do
traceIO $ show $ take 10 fib
@chomado
Copy link
Copy Markdown
Author

chomado commented Nov 4, 2014

(これはコンパイルは通るけど実行したら止まらなくなります)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment