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
const R = require("ramda"); | |
const data = { | |
title: "Intro to functional lenses", | |
author: { | |
name: "Jiri Marsicek", | |
email: "[email protected]", | |
position: { | |
name: "Software Engineer", |
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
module ParallelConcat where | |
import Prelude (Unit, (<<<), ($), bind) | |
import Types (Async) | |
import Control.Monad.Except.Trans (ExceptT, mapExceptT) | |
import Control.Parallel (inParallel, runParallel) | |
import Data.Foldable (fold) |
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
module Tree where | |
import Prelude | |
import Control.Alt | |
import Data.Either | |
import Data.Foreign | |
import Data.Foreign.Class |
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
module Tagged where | |
import Prelude | |
import Data.Either | |
import Data.Foreign | |
import Data.Foreign.Class | |
newtype Tagged a b = Tagged (Either a b) |
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
module RandomCircle where | |
-- 2. (Medium) Use the RANDOM and DOM effects to create an application which renders a circle with | |
-- random position, color and radius to the canvas when the mouse is clicked. | |
import Prelude | |
import Data.Maybe | |
import Data.Traversable (for) |
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
module RenderPath where | |
-- 3. (Medium) Given the following record type: | |
-- type Point = { x :: Number, y :: Number } | |
-- which represents a 2D point, write a function renderPath which strokes a closed path | |
-- constructed from a number of points: | |
-- | |
-- renderPath :: forall eff. Context2D -> | |
-- Array Point -> | |
-- Eff (canvas :: Canvas | eff) Context2D |