2 ms·
"for manipulating hashes, I almost always use |k, v|. If I'm working with pairs, |x, y|" Those are massive improvements over "@1 @2". You make the case yourse
by jimbokun 8y ago
"for manipulating hashes, I almost always use |k, v|. If I'm working with pairs, |x, y|"
Those are massive improvements over "@1 @2".
You make the case yourself. Using "k, v" as a convention immediately signifies these are a key and its value. Using x, y indicate this is a pair (and x and y are of the same type, I assume?).