argument checking, was: About submatrix and its meaning
Subject: argument checking, was: About submatrix and its meaning
From: Richard Fateman
Date: Sun, 22 Nov 2009 07:47:18 -0800
How about
foo(x,y,??x>y):= ....
so the predicate can involve all the parameters.
Note also the possibility of extending this idea to function
discrimination based on types or predicates
myabs(x??x>0):=x;
myabs(x??x<=0):= -x;
which brings us closer to (for example) common lisp object system, and
incidentally to Mathematica.
RJF