3 ms·
Because these are two basic building blocks of 'computation', I'd say first order. It's map and reduce in disguise (or the other way around, doesn't matter).
by agumonkey 12y ago
Because these are two basic building blocks of 'computation', I'd say first order. It's map and reduce in disguise (or the other way around, doesn't matter).
- [record] -> [derived from record] :: map
- Begin and End blocks are accumulator/stateful logic :: reduce
sed is also a little twisted version of awk, per line mapping, with pattern spaces for accumulations.
It's first order, because it can't reuse itself on smaller pieces of data, namely recursion (grammars, trees, etc)