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 Main where | |
| import Prelude | |
| import Control.Monad.ST as ST | |
| import Data.Array as Array | |
| import Data.Array.ST as Array.ST | |
| import Data.Foldable as Foldable | |
| import Effect (Effect) | |
| import Effect.Console as Console |
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 Main where | |
| import Prelude | |
| import Data.Foldable (fold) | |
| import Effect (Effect) | |
| import TryPureScript (h1, h2, p, text, list, indent, link, render, code) | |
| import Control.Monad.ST as ST | |
| import Data.Array.ST as Array.ST |
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 Main where | |
| import Prelude | |
| import Data.Maybe (Maybe(..)) | |
| import Effect (Effect) | |
| import Effect.Aff (Aff, delay, Milliseconds(..)) | |
| import Halogen as H | |
| import Halogen.Aff as HA | |
| import Halogen.HTML as HH |
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 Main where | |
| import Prelude | |
| import Data.Array (cons, drop, length) | |
| import Effect (Effect) | |
| import Effect.Aff (Aff, delay, makeAff, Milliseconds(..)) | |
| import Halogen as H | |
| import Halogen.Aff as HA | |
| import Halogen.HTML as HH |
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 HelloReactHooks.Main where | |
| import Prelude | |
| import Data.Maybe (Maybe(..)) | |
| import Effect (Effect) | |
| import Effect.Exception (throw) | |
| import React.Basic.DOM as R | |
| import React.Basic.DOM.Client (createRoot, renderRoot) | |
| import Web.DOM.NonElementParentNode (getElementById) |
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
| { config, pkgs, lib, ... }: | |
| let | |
| zsh-plugins = { | |
| nix-shell = (fetchGit { | |
| url = "https://github.com/chisui/zsh-nix-shell.git"; | |
| rev = "69e90b9bccecd84734948fb03087c2454a8522f6"; | |
| }); | |
| nix-zsh-completions = (fetchGit { |
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
| import * as L from "fp-ts-foldl" | |
| import Immutable from "immutable" | |
| import { readonlyArray as RA, readonlyNonEmptyArray as RNEA } from "fp-ts" | |
| import { pipe } from "fp-ts/function" | |
| import * as t from "transducers-js" | |
| const inc = (n: number) => n + 1 | |
| const isEven = (n: number) => n % 2 === 0 | |
| const sum = (a: number, b: number) => 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 Main where | |
| import Prelude | |
| import Effect (Effect) | |
| import Elmish.Dispatch (Dispatch) | |
| import Control.Monad.Cont (Cont, runCont) | |
| import Data.Newtype (class Newtype) | |
| newtype Effect' a = Effect' (Cont (Effect Unit) a) |
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 Main where | |
| import Prelude | |
| import Effect.Console (log) | |
| import TryPureScript | |
| whenFalseAndTrue = when (false && true) do | |
| log "whenFalseAndTrue" | |
| whenTrue = when true do |
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 Main where | |
| import Prelude | |
| import Data.Foldable (traverse_) | |
| import Effect.Console (log) | |
| import TryPureScript (render, withConsole) | |
| abc item = when (item.name == "NAME") $ do | |
| log "Here" |