added asClosure, scan, partially working curry