Scalaz | |||
Symbol | Code | Ascii | Example |
---|---|---|---|
η | 951 | pure | 1.η[List] |
μ | 03BC | join | List(List(1,2,3), nil, List(5,6,7)) μ |
∅ | 2205 | zero | ∅[Int] |
<∅> | empty | <∅>[Option, Int] |
|
∙ | 2219 | contramap | ((_:String).length ∙ (_:Int).toString ∙ ((_:Int) + 6))(5) |
∘ | 2218 | map | (((_:Int) + 6) ∘ (_:Int).toString ∘ (_:String).length)(5) |
∘∘ |
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
# BEWARE! This code is largely untested and not ready for production! | |
Result = Struct.new(:entries, :raw_error, :status) | |
class Entry | |
HeaderUnpackFormat = "Z100A8A8A8A12A12A8aZ100A6A2Z32Z32A8A8Z155".freeze | |
EmptyString = "".freeze | |
OctalFields = [1,2,3,4,5,6,10,13,14] | |
def self.from_stream(io) | |
header = io.read(512) |
Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.
Disclaimer 2: I should tidy this up but probably won’t.
Disclaimer 3: Yeah called it, better to be realistic.
Type classes are a language of their own, this is an attempt to document features and give a name to them.
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
#!/usr/bin/env stack | |
-- stack --resolver lts-8.12 script | |
-- Run this example with: `stack ParallelConduit.hs` | |
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} |