Zulip Chat Archive
Stream: new members
Topic: Parentheses for arguments
Zihao Zhang (Sep 12 2024 at 13:00):
a b:R,why add_comm (-a) b is right,add _comm -a b is wrong?
Notification Bot (Sep 12 2024 at 13:04):
A message was moved here from #new members > Using lean as a general language by Ruben Van de Velde.
Edward van de Meent (Sep 12 2024 at 13:08):
because add_comm -a b
means (((fun x y => x - y) add_comm) (a b))
due to the binding priorities of -
and function apprlication.
Eric Wieser (Sep 12 2024 at 13:08):
Or less confusingly, add _comm -a b
means (add_comm) - (a b)
Edward van de Meent (Sep 12 2024 at 13:10):
thanks, i had a hard time phrasing that :+1:
Last updated: May 02 2025 at 03:31 UTC