https://github.com/Helium4Haskell/lvm
Tip revision: 0173d58401074ae8128e506f76b2b96def7bf961 authored by Mias van Klei on 06 February 2020, 17:50:38 UTC
fix compilation: Constants import from Helium is used, this is not allowed, so move relevant parts from Helium to Lvm
fix compilation: Constants import from Helium is used, this is not allowed, so move relevant parts from Helium to Lvm
Tip revision: 0173d58
math.core
----------------------------------------------------------------
-- Daan Leijen (c) 2001
--
-- $Revision$
-- $Author$
-- $Date$
----------------------------------------------------------------
module Math where
import LvmLang
import Prelude
main
= sum (map square (fromTo 1 100))
square :: Int -> Int
square x
= (*) x x
sum :: [Int] -> Int
sum xs
= foldlStrict (+) 0 xs