Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (11 sloc) 0.337 kb
-- | This is to test tail-recursive calls are iterative.
{-# LANGUAGE NoImplicitPrelude #-}
module Tail where
import Language.Fay.FFI
import Language.Fay.Prelude
main = do
print (sum 100000 0 :: Double)
sum 0 acc = acc
sum n acc = sum (n - 1) (acc + n)
print :: Double -> Fay ()
print = ffi "console.log(%1)"
Jump to Line
Something went wrong with that request. Please try again.