doc: elabissue for underapplied proj notation

This commit is contained in:
Sebastian Ullrich 2019-10-28 10:41:18 +01:00 committed by Leonardo de Moura
parent a768aa0d1c
commit b6d96dc0f4

View file

@ -0,0 +1,11 @@
/- Underapplying a projection notation applies the 'this' argument to the wrong parameter.
It should either fail or (preferably) construct an explicit lambda. -/
-- Char → Bool
#check fun c => ['a', 'b'].elem c
-- List (List Char) → Bool
#check ['a', 'b'].elem
-- works
#check fun (s : String) => s.split (fun c => ['a', 'b'].elem c)
-- doesn't work
#check fun (s : String) => s.split (['a', 'b'].elem)