Skip to content

Instantly share code, notes, and snippets.

View Thecentury's full-sized avatar

Mikhail Brinchuk Thecentury

  • Eindhoven, the Netherlands
View GitHub Profile
@polytypic
polytypic / Zio.fsx
Last active January 16, 2023 14:42
Zio like monad in F#
// Computations with extensible environment, error handling, and asynchronicity
// I recently reviewed some F# code that turned out to be using
//
// Dependency Interpretation
// https://fsharpforfunandprofit.com/posts/dependencies-4/
//
// and got thinking about whether one could construct a usable Zio like monad
//
// https://zio.dev/
@NicolasT
NicolasT / active.hs
Created September 8, 2015 22:54
Haskell representation of F#-style Active Patterns
-- https://www.reddit.com/r/haskell/comments/3huexy/what_are_haskellers_critiques_of_f_and_ocaml/cuisrmj
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module Main where
import Text.Read (readMaybe)
pattern Even <- ((`mod` 2) -> 0)