You really just want to call out from the case-lambda branches to other
functions that are then designed according to what you want to parse, and you
can then share pieces that are common to both branches.
> On Nov 14, 2015, at 11:10 AM, Christopher Walborn wrote:
>
> Ok. So you're using c
Ok. So you're using command-line in the body of the first case, and
the-mandatory-argument takes the first word. Thanks to #:argv others,
command-line can process the remaining ones. `./manage -h` would essentually
give `racket -h` while `./manage anything -h` would give you help from
command-l
It is not an either-or situation. Here is an alternative run where I combined
case-lambda with command-line:
> $ ./manage hello -t world -d good
> (the-mandatory-argument: hello #t)
> (-t #f)
> (-d good)
> (files: ())
The script is this now:
#! /bin/sh
#|
exec racket -tm "$0" ${1+"$@"}
|#
#l
3 matches
Mail list logo