1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00

Redefine mul to disambiguate

It's not immediately obvious which previous `mul` definition applies,
and is a copy-paste hazard. Staring the block with a `mul = ...` is also
consistent with the other code blocks.

Fixes #46
This commit is contained in:
John Ericson 2018-04-11 18:10:16 -04:00 committed by John Ericson
parent 959526f5f8
commit e5534d4641

View file

@ -1,3 +1,4 @@
nix-repl> mul = { a, b }: a*b
nix-repl> mul { a = 3; b = 4; c = 6; }
error: anonymous function at (string):1:2 called with unexpected argument `c', at (string):1:1
nix-repl> mul { a = 3; }