News for hackers. Stuff that matters.
Re:Pattern matching accepted for Python by globuous on Wednesday February 10, 2021 @06:16AM (#26087809)
Isn't it the same in ML though (using the same syntax in different contexts) ? Compare `| [a, b] => a + b` and `let my_list = [a, b]`. Same in JS, `let {a, b} = {a: 1, b: 2}` and `let d = {a, b}`. It's weird at first but then you just get used to it.

edit: updated list name since pipe ("|") and small L ("l") look kind similar in the code snippets.

There are no comments on this comment yet.