Skip to content

Instantly share code, notes, and snippets.

View lupuszr's full-sized avatar

Viktor Pelle lupuszr

View GitHub Profile
@lupuszr
lupuszr / README.md
Last active April 24, 2020 10:16 — forked from pbojinov/README.md
Two way iframe communication

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@lupuszr
lupuszr / combinators.js
Created February 20, 2019 10:59 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@lupuszr
lupuszr / Purescript FFI example for react-native.md
Last active December 25, 2018 21:21 — forked from dwhitney/README.md
Quick React Native with PureScript
  1. create-react-native-app purescript-app; cd purescript-app

  2. pulp init --force

  3. pulp build

  4. src/Main.js

var React = require("react");
var RN = require("react-native");

exports.text = function(props){
@lupuszr
lupuszr / introrx.md
Created May 28, 2016 12:53 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing