see: https://github.com/bleis-tift/SmlSharpContrib
SML#のライブラリが足りないのでなんとかしたい。
- こったライブラリにはしない
- 適当なCライブラリの薄いラッパにする
- メソッドはすべて移植する(よっぽど不要なやつは省く?)
Inductive Term : Set := | |
| T | |
| F | |
| TIf (_ : Term) (_ : Term) (_ : Term). | |
Inductive Step : Term -> Term -> Prop := | |
| EIfTrue : forall (t1 t2 : Term), Step (TIf T t1 t2) t1 | |
| EIfFalse : forall (t1 t2 : Term), Step (TIf F t1 t2) t2 | |
| EIf : forall (t1 t1' t2 t3 : Term), Step t1 t1' -> Step (TIf t1 t2 t3) (TIf t1' t2 t3). |
see: https://github.com/bleis-tift/SmlSharpContrib
SML#のライブラリが足りないのでなんとかしたい。
namespace Persimmon.Runner.Wrapper | |
open Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging | |
open System | |
open System.Collections.Generic | |
open System.Reflection | |
module private TestCollectorImpl = | |
open Persimmon |
import scalaz._, Scalaz._ | |
case class KnightPos(c: Int, r: Int) { | |
def move: List[KnightPos] = | |
for { | |
KnightPos(c2, r2) <- List(KnightPos(c + 2, r - 1), KnightPos(c + 2, r + 1), | |
KnightPos(c - 2, r - 1), KnightPos(c - 2, r + 1), | |
KnightPos(c + 1, r - 2), KnightPos(c + 1, r + 2), | |
KnightPos(c - 1, r - 2), KnightPos(c - 1, r + 2)) if ( | |
((1 |-> 8) element c2) && ((1 |-> 8) contains r2)) |
package msgpack4z | |
import java.math.BigInteger | |
import scodec.Attempt | |
import scodec.bits.{BitVector, ByteVector} | |
import scodec.msgpack.codecs.MessagePackCodec | |
import scodec.msgpack.{MNil, MessagePack, Serialize} | |
object ScodecPacker { |
ぱぴろん(Papylon)は、満たすべき性質(property)を記述することでテストケースを自動生成する Python 用テスティングツールです。いわゆる"QuickCheck"系の流れを汲み、 FsCheck と ScalaCheck の影響を強く受けています。テストしたい対象の振る舞うべき性質を記述して実行すると、テストケースをランダムに生成して実行し、性質が成り立つかどうかを確認します。
Scalaz | Cats |
---|---|
Cobind | CoflatMap |
Bind | FlatMap |
MonadPlus | MonadCombine |
PlusEmpty | MonoidK |
Foldable1 | Reducible |
Plus | SemigroupK |
These | Ior |
Validation | Validated |
Language | ||||||||
---|---|---|---|---|---|---|---|---|
Common Lisp | mapc | mapcar | find-if | remove-if-not | reduce | reduce :from-end t | some | every |
Scheme | for-each | map | find | filter | fold, fold-left | fold-right | any, exists | every, for-all |
Haskell | mapM_ | map | find | filter | foldl | foldr | any | all |
Caml Light | do_list | map | - | - | it_list | list_it | exists | for_all |
OCaml | iter | map | find | filter, find_all | fold_left | fold_right | exists | for_all |
F# | iter | map | find | filter | fold | foldBack | exists | forall |
Push-Lazy-Push Multicast Tree.
高いスケーラビリティ、信頼性 (Reliability) 、回復力 (Resiliency) を達成するため、 流行性のブロードキャスト (Epidemic Broadcast) と、 決定論的なツリーに基づくブロードキャスト (Deterministic Tree-Based Broadcast) を統合する。
純粋な Gossip Protocol と異なり、ブロードキャスト用のツリーを構築するフェーズで、冗長な転送経路が取り除かれるので、重複するメッセージが大量に転送されることはない。
;;;; Freer monad in Scheme | |
;;;; See also | |
;;;; * "Freer monads, more extensible effects" | |
;;;; http://dl.acm.org/citation.cfm?doid=2804302.2804319 | |
;;;; * Free monad in Scheme https://gist.github.com/wasabiz/951b2f0b22643a59aeb2 | |
(use gauche.record) | |
(use util.match) | |
;;; data Freer f a where | |
;;; Pure :: a -> Freer f a |