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
| { | |
| base64ToBuffer: base64 => new TextEncoder().encode(atob(base64)), | |
| bufferToBase64: buffer => btoa(String.fromCharCode(...new Uint8Array(buffer))) | |
| } |
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 nums$ = fromEvent(document, "click").pipe( | |
| mapTo(((x: number) => x + 1)), | |
| scan((acc, whatever) => acc, 0) | |
| ); | |
| /* | |
| Argument of type 'MonoTypeOperatorFunction<number>' is not assignable to parameter of type 'OperatorFunction<(x: number) => number, number>'. | |
| Types of parameters 'source' and 'source' are incompatible. | |
| Type 'Observable<(x: number) => number>' is not assignable to type 'Observable<number>'. | |
| Type '(x: number) => number' is not assignable to type 'number'. |
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
| { | |
| "type": "package", | |
| "name": "ccapndave/elm-tree-path", | |
| "summary": "Strongly typed fixed level trees with a zipper.", | |
| "license": "BSD-3-Clause", | |
| "version": "1.0.0", | |
| "exposed-modules": [ | |
| "TreePath.Data", | |
| "TreePath.Tree2", | |
| "TreePath.Tree3", |
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
| port module WebSocket exposing (listen, send, open) | |
| open : String -> Cmd msg | |
| open url = | |
| wsOpen { url = url } | |
| send : String -> String -> Cmd msg | |
| send url message = |
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 type SelectData = { | |
| type t; | |
| let id: t => string; | |
| let toString: t => string; | |
| }; | |
| module Styles = { | |
| open Css; | |
| let search = style([width(px(300)), fontSize(px(20))]); |
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 type GridInterface = { | |
| type t('a); | |
| let make: (~xNames: list(string), ~yNames: list(string)) => t('a); | |
| let xNames: t('a) => list(string); | |
| let yNames: t('a) => list(string); | |
| let get: (t('a), ~x: int, ~y: int) => option('a); | |
| /* let set: (t('a), ~x: int, ~y: int, ~value: 'a) => t('a); */ | |
| }; | |
| module Grid: GridInterface = { |
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 Grid = { | |
| module type Grid = {type t;}; | |
| type t = { | |
| rowNames: list(string), | |
| columnNames: list(string), | |
| data: array(array(string)), | |
| }; | |
| let make = (~rowNames, ~columnNames): t => { |
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 TreePath.Tree4 | |
| exposing | |
| ( DecoderConfig | |
| , Tree | |
| , TreePath1 | |
| , TreePath2 | |
| , TreePath3 | |
| , TreePath4 | |
| , data1 | |
| , data2 |
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
| type NodeId | |
| = NodeMenuId | |
| | NodeCourseId String | |
| | NodeUnitId String | |
| | NodeExerciseId String | |
| nodeIdDecoder : Decoder NodeId | |
| nodeIdDecoder = | |
| JD.string |> JD.andThen (\nodeStr -> |
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 Tree4 exposing (..) | |
| import Array exposing (Array) | |
| import Data exposing (Data) | |
| type Tree4 a b c leaf = | |
| Tree4 | |
| { data : Data a leaf | |
| , children : Array (Tree3 b c leaf) | |
| } |