I hereby claim:
- I am clarkenciel on github.
- I am clarkenciel (https://keybase.io/clarkenciel) on keybase.
- I have a public key ASDZNa1JVCfIPwNGB17fq5DTL4jq6i_X6viPw29TLKPZLgo
To claim this, I am signing this object:
import * as r from "fp-ts/Reader" | |
import * as array from "fp-ts/ReadonlyArray" | |
import * as option from "fp-ts/Option" | |
import * as either from "fp-ts/Either" | |
import * as fn from "fp-ts/function" | |
import type * as cr from "fp-ts/ChainRec" | |
import type * as applicative from "fp-ts/Applicative" | |
import type * as hkt from "fp-ts/HKT" | |
import type * as functor from "fp-ts/lib/Functor" | |
import type * as foldable from "fp-ts/lib/Foldable" |
I hereby claim:
To claim this, I am signing this object:
module queen | |
open util/time | |
open util/ordering[Player] | |
abstract sig Card{} | |
sig NormalCard extends Card{} | |
one sig FinalCard extends Card{} | |
sig Player{ succ : one Player } |
:(){ :|:& };: |
class Line | |
include Enumerable | |
delegate :each, to: :@elements | |
attr_reader :elements, :attributes | |
def initialize elements: [], attributes: {} | |
@elements = elements | |
@attributes = Attributes.new(**(attributes || {})) |
package main | |
import ( | |
"fmt" | |
"time" | |
"sync" | |
"math/rand" | |
) | |
func main() { |
clj.core> (let [s1 (->> '(1 2 3) | |
(map #(do (println (* 10 %)) %)) | |
(map #(do (println %) %))) | |
] | |
s1) | |
10 | |
1 | |
20 | |
2 | |
30 |
(ns grading-students | |
(:require [clojure.java.io :as io])) | |
(defn nearest-five [grade] | |
(let [increased (+ grade 5)] | |
(- increased | |
(mod increased 5)))) | |
use std::collections::HashMap; | |
enum Stmt { | |
Expr(Expr), | |
Let(Name, Expr), | |
} | |
struct Name(String); | |
enum Expr { |
# sequence :: Monad m => [m a] -> m [a] | |
# | |
# a way of implementing this functionality is through a left fold | |
# that unwraps the each monad in the first list and accumulates it | |
# in the second list, rewrapped in the target monad: | |
# | |
# sequence actions = foldl unwrapAccumulateRewrap (return []) actions | |
# where unwrapAccumulateRewrap wrappedAccumulator action = | |
# wrappedAccumulator >>= \accumulator -> action >>= \value -> return (value : accumulator) | |
# |