Sharedsupport / 2018-04-07-134131-haskell.ipynbOpen in CoCalc
Author: William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.
In [ ]:
2 + 3
In [3]:
(+) 2 3
5
In [4]:
putStrLn "Hello from CoCalc"
Hello from CoCalc
In [ ]:
primesTo m = eratos [2..m] where eratos [] = [] eratos (p:xs) = p : eratos (xs `minus` [p, p+p..])
In [12]:
primesTo 10
<interactive>:3:5-22: Non-exhaustive patterns in function eratos
In [ ]: