Created
March 22, 2019 18:48
-
-
Save cblp/70a4ffe1b8d6bd9e3f79f93b28b8b6d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --resolver=lts-13.10 script | |
{-# LANGUAGE OverloadedStrings #-} | |
import qualified Data.Text.Lazy as TextL | |
import Math.NumberTheory.Recurrencies | |
import Web.Scotty | |
main = scotty 8080 $ | |
get "/fib/:n" $ do | |
n <- param "n" | |
text $ TextL.pack $ show $ fibonacci n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment