On 20 May, Kevin Atkinson wrote:
>  Sorry typo.  That should be optional.

Is this a job for overloading?  I think it would be better to provide
some syntactig sugar and compile-time checks for something like this:

data Argtype = Arg {a::Int, b::Bool, c::Char}
arg = Arg {a = 1, b = True, c = error "c mandatory"}

f (Arg _ True c) = c
f (Arg n False c) = head (show n)

main = putStr (show (f $ arg {c = 'c'}))


>  It should be.
>  
>  array (range 1 to 10) [(1,1), (1,2) ....]
>  array (range 1 to 10 skip 2) [(1,1), (3,2) ...]
>  array (range 1 to 100 factor 2] [(1,1), (2,2), (4,3), (8,4) ...]
>  
>  Perhapes range is not a good word to use.  Maybe indices instead.

I don't see what you are getting at here. 'array' takes a list as an
argument.

-- 
J�n Fairbairn                                 [EMAIL PROTECTED]
18 Kimberley Road                                        [EMAIL PROTECTED]
Cambridge CB4 1HH                      +44 1223 570179 (pm only, please)



Reply via email to