I'm trying to add a simple command line interface to a program and receive the following error:
parse-command-line: expected argument of type <table as a list of flag-list/procedure pairs (spec-line help list strings must match procedure arguments)>; given: '((once-each (("-i" "--input\ -file") #<procedure:...sis/com_line.rkt:12:25> ("Use <input_file> as the input file.")))) context...: The command should take a single flag and an input file as arguments. Code below. Any help would be much appreciated. #lang racket (require racket/base racket/cmdline) (parse-command-line "com_line" ;; argv (current-command-line-arguments) ;; table `((once-each [("-i" "--input-file") ,(lambda (flag in) (displayln "Using <in>")) ("Use <input_file> as the input file.")])) ;; finish-proc (lambda (flag-accum file) file) ;; help-proc (lambda () (displayln "com_line -i | --input-file input file")) ;; unknown-proc (lambda (unknown_flag) (displayln "Unknown flag: <unknown_flag>"))) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.