Skip to content

Instantly share code, notes, and snippets.

Teemu Kurppa tmu

Block or report user

Report or block tmu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tmu /
Created Nov 17, 2016
Keybase proof

Keybase proof

I hereby claim:

  • I am tmu on github.
  • I am tmu ( on keybase.
  • I have a public key ASBh_n52Q2_-Boszc2JW29F091gntcQolSdSJJAs5fNkVQo

To claim this, I am signing this object:

tmu / 028-reduce-over-extensible-collection.swift
Created Aug 26, 2014
Code that crashes Swift compiler frontend
View 028-reduce-over-extensible-collection.swift
// 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
You can’t perform that action at this time.