Skip to content

Instantly share code, notes, and snippets.

birthday(5,15). birthday(5,16). birthday(5,19).
birthday(6,17). birthday(6,18).
birthday(7,14). birthday(7,16).
birthday(8,14). birthday(8,15). birthday(8,17).
countd(D,C) :- #count{X: birthday(X,D) } = C, birthday(_,D).
countm(M,C) :- #count{X: birthday(M,X) } = C, birthday(M,_).
% Satz 1
result(M,D) :- birthday(M,D), countm(M,C1), countd(D,C2), C1 > 1, C2 > 1.
@esad
esad / .jazzy.yaml
Created February 4, 2016 16:41
Jazzy stray struct example
module: StrayStruct
author: Esad Hajdarevic
author_url: http://github.com/esad
objc: true
clean: true
framework_root: .
umbrella_header: foo.h
sdk: iphonesimulator
custom_categories:
- name: Bravo Struct Hits 1999
module Response where
import List
import Effects exposing (Effects)
import Task exposing (Task)
import Result exposing (Result)
type alias Response model action = (model, Effects action)
withModel : Effects a -> m -> Response m a
module PouchDB where
import Task
import Json.Decode exposing (..)
import Native.PouchDB
type PouchDB = PouchDB
type alias Document a =
foreign import md5 :: String -> String
infixl 1 applyFlipped as |>
findPassword :: String -> String
findPassword doorId =
aux 0 Nil
where
aux :: Int -> List Char -> String
aux k cs =
case (doorId <> (show k)) |> md5 |> String.toCharArray |> List.fromFoldable of
modify' f = do
modify f
state <- get
localStorage <- fromEff getLocalStorage
fromEff $ setItem localStorage stateKey state
module X where
import Data.Newtype
import Data.Lens (Lens')
import Data.Lens.Iso.Newtype (_Newtype)
newtype X = X Int
ten = X 10
type ItemRef = Int
newtype Item = Item
{ text :: String
, done :: Boolean
, ref :: ItemRef
}
derive instance newtypeItem :: Newtype Item _
type Foo<'a> = Foo of string
let get (Foo key : Foo<'a>) : 'a option =
None
let set (Foo key : Foo<'a>) (value : 'a) =
()
let f = Foo "test"

Keybase proof

I hereby claim:

  • I am esad on github.
  • I am esad (https://keybase.io/esad) on keybase.
  • I have a public key ASAfen-9PxDRLHSaNvxQ9Xz73TqSHasb41ifGZG90eNejAo

To claim this, I am signing this object: