Skip to content

Instantly share code, notes, and snippets.

View gtani7's full-sized avatar

Gene Tani gtani7

  • north of Seattle
View GitHub Profile
@gtani7
gtani7 / gist:6b784421bb6dcda160ae
Last active August 29, 2015 14:06
haskell advocacy/marketing
http://www.jerf.org/iri/post/2908
http://mwotton.github.com/hs_gbu/
http://reddit.com/r/haskell/comments/y6i7d/do_we_have_real_world_examples_of_where_static/
http://reddit.com/r/haskell/comments/12e3a0/the_good_the_bad_and_the_ugly_haskell_in/
http://blog.codersbase.com/2010/09/composability-laziness-testing-and.html
https://www.fpcomplete.com/user/imalsogreg/functional-programming-elevator-pitch
http://evincarofautumn.blogspot.com/2012/07/so-i-write-compilers-for-living-now.html
http://www.reddit.com/r/haskell/comments/2gz7s1/please_point_me_at_an_eloquent_paper_or_post_on/
@gtani7
gtani7 / HashTable.hs
Created October 25, 2011 11:52 — forked from 23Skidoo/HashTable.hs
n-gram
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
import qualified Data.Sequence as S
import qualified Data.Foldable as F
import Control.Monad
import Data.Hashable
import Data.Sequence ((|>), ViewL(..))
import Data.Function (on)
import qualified Data.ByteString.Char8 as B
import qualified Data.HashTable.IO as H
import Data.List
@gtani7
gtani7 / gist:1312277
Created October 25, 2011 10:52 — forked from dcsobral/gist:1120811
Existential _ vs Higher-kind _
scala> def f[A[_] <: Seq[_]](f: A[Int]) = f.head
f: [A[_] <: Seq[_]](f: A[Int])A
scala> def f[A[_] <: Seq[t] forSome { type t }](f: A[Int]) = f.head
f: [A[_] <: Seq[_]](f: A[Int])A
scala> def f[A[t] <: Seq[_] forSome { type t}](f: A[Int]) = f.head
f: [A[t] <: Seq[_] forSome { type t }](f: A[Int])A
@gtani7
gtani7 / gist:1312269
Created October 25, 2011 10:50
Dependent method types
scala> trait Foo { type Bar }
defined trait Foo
scala> def withFoo(foo: Foo): foo.Bar = // The return type depends on the parameter!
| sys.error("Not yet implemented")
withFoo: (foo: Foo)foo.Bar