diff --git a/snippets/group_by.md b/snippets/group_by.md index 233197f4d..06147a45d 100644 --- a/snippets/group_by.md +++ b/snippets/group_by.md @@ -19,5 +19,5 @@ def group_by(lst, fn): ```py import math group_by([6.1, 4.2, 6.3], math.floor); # {4: [4.2], 6: [6.1, 6.3]} -group_by(['one', 'two', 'three'], 'length'); # {3: ['one', 'two'], 5: ['three']} +group_by(['one', 'two', 'three'], len); # {3: ['one', 'two'], 5: ['three']} ```