Skip to content

Instantly share code, notes, and snippets.

View skhe's full-sized avatar
💭
I may be slow to respond.

skhe skhe

💭
I may be slow to respond.
View GitHub Profile
@skhe
skhe / quick_sort.py
Created March 8, 2017 09:59
[quick_sort] #tags: python
qs = lambda xs : ( (len(xs) <= 1 and [xs]) or [ qs( [x for x in xs[1:] if x < xs[0]] ) + [xs[0]] + qs( [x for x in xs[1:] if x >= xs[0]] ) ] )[0]
@skhe
skhe / fold_right.ml
Last active March 8, 2017 09:55
[fold_right] #tags: ocaml
let rec fold_right f l e = match l with
| [] -> e
| a::r -> f a (fold_right f r e);;