In your command-line run the following commands:
brew doctorbrew update
| /* | |
| * Concept for emulating higher-kinded types using Flow. Instead of passing | |
| * a type that has not been applied to parameters, this pattern passes | |
| * a type-level function that will map a parameter type to the desired | |
| * higher-kinded type applied to the given parameter. | |
| * | |
| * @flow | |
| */ | |
| // type-level function application |
| {-# LANGUAGE InstanceSigs #-} | |
| module Haph (bfs) where | |
| import qualified Data.Set as Set | |
| import qualified Data.Map as Map | |
| import qualified Data.List.Ordered as O | |
| newtype AdjacencyList v = AdjacencyList (Map.Map v [v]) | |
| class Graph g where |
In your command-line run the following commands:
brew doctorbrew updateIn your command-line run the following commands:
brew doctorbrew update| 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))); |
| SPC s c remove highlight | |
| **** Files manipulations key bindings | |
| Files manipulation commands (start with ~f~): | |
| | Key Binding | Description | | |
| |-------------+----------------------------------------------------------------| | |
| | ~SPC f c~ | copy current file to a different location | | |
| | ~SPC f C d~ | convert file from unix to dos encoding | | |
| | ~SPC f C u~ | convert file from dos to unix encoding | |
| import Control.Monad | |
| ------------------------------------------------------------------------------- | |
| -- State Monad Implementation | |
| ------------------------------------------------------------------------------- | |
| newtype State s a = State { runState :: s -> (a,s) } | |
| instance Monad (State s) where | |
| return a = State $ \s -> (a, s) |
Note: This guide applies to the project created by quasar-cli.
First install typescript and ts-loaderpackages in your project.
npm i -D typescript ts-loaderThen modified the quasar.conf.js file in your project:
| {-# LANGUAGE RecordWildCards, Arrows #-} | |
| import Numeric | |
| import Data.Char | |
| import Control.Monad | |
| import Data.Monoid ((<>)) | |
| import Data.List (nub, sort, reverse) | |
| data RepeatBounds = RB |
| 'use strict'; | |
| /*****************NATIVE forEACH*********************/ | |
| Array.prototype.myEach = function(callback) { | |
| for (var i = 0; i < this.length; i++) | |
| callback(this[i], i, this); | |
| }; | |
| //tests |