Skip to content

Instantly share code, notes, and snippets.

Jiri j1r1k

Block or report user

Report or block j1r1k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@j1r1k
j1r1k / functionalLenses.js
Created Mar 8, 2018
Code from a ngParty talk @ 7th Mar 2018
View functionalLenses.js
const R = require("ramda");
const data = {
title: "Intro to functional lenses",
author: {
name: "Jiri Marsicek",
email: "jiri.marsicek@gmail.com",
position: {
name: "Software Engineer",
@j1r1k
j1r1k / ParallelConcat.purs
Created May 28, 2016
PureScript by Example: Chapter 12 (Callback Hell) exercise 12.8.1
View ParallelConcat.purs
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)
@j1r1k
j1r1k / Tree.purs
Created May 16, 2016
PureScript by Example: Chapter 10 (The Foreign Function Interface) exercise 10.19.5
View Tree.purs
module Tree where
import Prelude
import Control.Alt
import Data.Either
import Data.Foreign
import Data.Foreign.Class
@j1r1k
j1r1k / Tagged.purs
Last active May 16, 2016
PureScript by Example: Chapter 10 (The Foreign Function Interface) exercise 10.19.4
View Tagged.purs
module Tagged where
import Prelude
import Data.Either
import Data.Foreign
import Data.Foreign.Class
newtype Tagged a b = Tagged (Either a b)
@j1r1k
j1r1k / RandomCircle.purs
Last active Aug 30, 2017
PureScript by Example: Chapter 9 (Canvas Graphics) exercise 9.8.2
View RandomCircle.purs
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)
@j1r1k
j1r1k / RenderPath.purs
Last active May 14, 2016
PureScript by Example: Chapter 9 (Canvas Graphics) exercise 9.4.3
View RenderPath.purs
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
You can’t perform that action at this time.