Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- import Prelude
- import Control.Monad.Eff.Console (logShow)
- import Control.Bind
- import Data.Maybe
- import TryPureScript
- -- Find Pythagorean triples using an array comprehension.
- maybeSum :: Maybe Number -> Maybe Number -> Maybe Number
- maybeSum a b =
- bind a (\n ->
- bind b (\m ->
- pure (n + m)))
- main = bind (withConsole (logShow (maybeSum (pure 1.0) (pure 2.0)))) render
Add Comment
Please, Sign In to add comment