50g System RPL list processing
|
10-31-2014, 12:23 PM
Post: #11
|
|||
|
|||
RE: 50g System RPL list processing
(10-31-2014 08:25 AM)Marcus von Cube Wrote: Why not define two generic objects nil and unit which behave properly when used in further calculations, i. e. like zero and one when combined with numbers, like an empty string and and error when combined with strings, and so forth? Interesting idea. There's a case where I don't quite understand how to proceed: Let's say we have a program that does the sum of a list of 2x2 matrices, then multiplies that by a 2x4 matrix for a 2x4 result. If the list happens to be empty, the result would be nil, and when multiplied by a 2x4 matrix, how do we know that nil was a scalar value, or a Nx2 matrix? We know it has to be Nx2 to be able to be multiplied, but we can't figure out N, so what should be the size of the result? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)