Arc Forumnew | comments | leaders | submitlogin
Duplicated functionality
1 point by almkglor 5921 days ago | 3 comments
I've been doing the help docstrings on the git://nex-3.org/arc-wiki.git and noticed that a few functions/macros have duplicated functionality.

For example, 'on and 'each are highly similar. The only difference is that 'on provides an 'index variable for the index. As far as I can tell the only function that uses 'on is 'mismatch

Another example is 'maps and 'mappend. 'maps uses 'join while 'mappend uses '+ (but guards it with a nil anyway, so you can't return numbers or strings). These two appear to have exactly the same functionality.

Anyone else who can find duplicated functionality wins the Arc prize for obsession ^^



3 points by almkglor 5921 days ago | link

Here's another pair: 'split and 'splitn. The only apparent difference is order of arguments - 'split expects the list first, while 'splitn expects the number first. Both functions cannot handle strings.

-----

2 points by pg 5920 days ago | link

That does sound like a dupe.

-----

2 points by pg 5920 days ago | link

Actually they're not the same: split is destructive.

However, the one use of splitn doesn't need to be nondestructive, so I'm getting rid of it.

-----