@vv Thanks. It works fine. Just one small complain is that when it is used for type declaration of the allowable arguments of a procedure, then in case of giving a wrong type input table to the procedure, the generated error message is not very informative for the user, specifically if the user is not familiar with programming and is just going to use your defined proc. Let's look at the following simple example.
testProc:=proc(inputTable::satisfies(e -> e::'table', e -> [indices(e,nolist)]::list(integer), e -> [entries(e,nolist)]::list(list(integer))))
testProc(table([1=[12,14],2=[x]])); gives an error saying the input argument is not of a correct type, but its message is not in a very informative way.
Error, invalid input: testProc expects its 1st argument, inputTable, to be of type satisfies(proc (e) options operator, arrow; e::'table' end proc, proc (e) options operator, arrow; [indices(e, nolist)]::(list(integer)) end proc, proc (e) options operator, arrow; [entries(e, nolist)]::(list(list(integer))) end proc), but received table( [( 1 ) = [12, 14], ( 2 ) = [x] ] )
For example if it would say a simple message that the entries of the input table have to be of the type
integer, it would be easier for the user to notice the problem of his inputs, specially if he is not familiar with programming.
But thanks for introducing
satisfies. I may put some lines to produce better error message for the user whenever it is necessary.