3 ms·
They also don't cons. Structs do.
by dreamcompiler 4y ago
They also don't cons. Structs do.
- sargstuff 4y agolisp -> 1-n; s-expression 1st element ins () is the "memory index" structs -> n * M; "m-expression" 1st element outside of () is the "memory index". cons struc vs. cons lisp () is apples/oranages comparison. if convert both the 'cons struc' and the cons lisp () to same byte vector/stack or equivalent byte tree/heap, then yes, both 'cons' functions are equivalent. higher order equivalent of mealy state machine vs. moore state machine. [1] side note: ( 1 - n ) vs (n * m) is context reference to ploting base 2 log(x). (1 - n ) can never exceed 1. N * M, relative to (1 - n) is unbounded. ===== [1] : https://www.geeksforgeeks.org/difference-between-mealy-machine-and-moore-machine/ https://www.geeksforgeeks.org/difference-between-mealy-machi...
- sargstuff 4y agoWrapping the multivalue return using decorators / generators would provide the 'struct' equivalent without rewriting to 'single' struct. lisp approach to dectorators / generators disucssion. https://stackoverflow.com/questions/32956033/is-there-a-straightforward-lisp-equivalent-of-pythons-generators https://stackoverflow.com/questions/32956033/is-there-a-stra...