Answer by lericr for Pattern matching tuples as inputs to pure function
This expressionx_ : {{__} ..}is actually an Optional. It's a way to give a default value to an argument. We can demonstrate what it does with this:myfun[g[x, {a, b}]](* {{a*__^b}} *)So, it's equivalent...
View ArticleAnswer by Ben for Pattern matching tuples as inputs to pure function
I figured out one of my issues on my own and figured I would update this question in case others happen upon it.I had a syntactic error in the definition of my function.Instead ofmyfun[f_[args__,...
View ArticlePattern matching tuples as inputs to pure function
I've been having an issue with functions which are supposed to receive as input a list of tuples.My troubles are two-fold:The function doesn't properly identify the pattern test I laid out in the...
View Article
More Pages to Explore .....