Are there practice notebooks or exercises for practising using pure functions and rule-patterns?
I've completed "An Elementary Introduction to the Wolfram Language" and "Fast Introduction for Programmers" but there were some examples missing for things like sequential slot (##1) or more complex combinations of using pure functions with rule-patterns.
I've taken a look at "Wolfram Programming Cloud" but the examples there are more to do with practical examples using Wolfram functions and datasets.
##n
andAttributes
. See the Generalizations and Extensions. For patterns, what Ted Eresk suggested is useful, but I also have to highly recommend looking atOptional
. I use variants onf[a:_Type:default]:=body
all the time. See this as an example of how this works. $\endgroup$