strict by default
- www.restaumatic.com, www.luna-lang.org, typed.space
This file contains 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
-- -------------------------- specular -------------------------- | |
-- Specular.FRP.Base | |
filterMapEvent :: forall a b. (a -> Maybe b) -> Event a -> Event b | |
filterEvent :: forall a. (a -> Boolean) -> Event a -> Event a | |
filterJustEvent :: forall a. Event (Maybe a) -> Event a | |
subscribeEvent_ :: forall m a. MonadEffect m => MonadCleanup m => (a -> Effect Unit) -> Event a -> m Unit | |
never :: forall a. Event a | |
newEvent :: forall m a. MonadEffect m => m { event :: Event a, fire :: a -> Effect Unit } | |
leftmost :: forall a. Array (Event a) -> Event a |
This file contains 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
-- specular | |
-- Specular.FRP.Base | |
nextTimeRef :: Ref Time | |
readBehavior :: forall a. Behavior a -> Pull a | |
newtype Event a = Event | |
{ occurence :: Behavior (Maybe a) | |
, subscribe :: Listener -> Effect Unsubscribe | |
} | |
newtype Dynamic a = Dynamic |
This file contains 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
(ns bsf) | |
(defn queue | |
([] (clojure.lang.PersistentQueue/EMPTY)) | |
([coll] | |
(reduce conj clojure.lang.PersistentQueue/EMPTY coll))) | |
(def graph1 | |
{"you" '("alice" "bob" "claire") | |
"bob" '("anuj" "peggy") |
This file contains 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
# from a book Grokking Algorithms | |
from collections import deque | |
graph = {} | |
graph["you"] = ["alice", "bob", "claire"] | |
graph["bob"] = ["anuj", "peggy"] | |
graph["alice"] = ["peggy"] | |
graph["claire"] = ["thom", "johny"] | |
graph["anuj"] = [] |
This file contains 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 BSF where | |
import Universum | |
import Data.Sequence (Seq (..), (><)) | |
import qualified Data.Sequence as Seq | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
This file contains 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 Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Browser exposing (sandbox) | |
type alias Model = | |
{ message : String | |
, count : Int | |
} |
This file contains 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 Solver1 where | |
import Data.Ord (comparing) | |
import Data.Foldable (minimumBy) | |
maxVal :: [(Int, Int)] -> Int | |
maxVal l = max (maximum l1) (maximum l2) | |
where | |
(l1, l2) = unzip l |
This file contains 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
{ | |
"workbench.colorTheme": "DktnBrain", | |
"terminal.integrated.fontSize": 12, | |
"window.zoomLevel": 0, | |
"window.restoreWindows": "all", | |
"editor.fontSize": 12, | |
"editor.lineHeight": 15, |