Skip to content

Instantly share code, notes, and snippets.

View tmu's full-sized avatar

Teemu Kurppa tmu

View GitHub Profile
@tmu
tmu / keybase.md
Created November 17, 2016 19:46
Keybase proof

Keybase proof

I hereby claim:

  • I am tmu on github.
  • I am tmu (https://keybase.io/tmu) on keybase.
  • I have a public key ASBh_n52Q2_-Boszc2JW29F091gntcQolSdSJJAs5fNkVQo

To claim this, I am signing this object:

@tmu
tmu / 028-reduce-over-extensible-collection.swift
Created August 26, 2014 18:24
Code that crashes Swift compiler frontend
// Run with
// xcrun swift -O 028-reduce-over-extensible-collection.swift
func deleteDuplicates<S:ExtensibleCollectionType where S.Generator.Element: Comparable>(seq:S)-> S {
let s = reduce(seq, S()){
ac, x in contains(ac,x) ? ac : ac + [x]
}
return s
}