Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
On Fri, Sep 10, 2021 at 1:33 PM kamist...@gmail.com wrote: > I like the apply max instead of foldl, quite a bit easier. > > Instead of `(format "\t~a" (~a (~a k #:width width) v #:separator "\t"))` > I prefer one of these: > (~a "\t" (~a k #:width width) "\t" v) > (~a #:separator "\t" "" (~a k

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread kamist...@gmail.com
I like the apply max instead of foldl, quite a bit easier. Instead of `(format "\t~a" (~a (~a k #:width width) v #:separator "\t"))` I prefer one of these: (~a "\t" (~a k #:width width) "\t" v) (~a #:separator "\t" "" (~a k #:width width) v) -- You received this message because you are

Re: [racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
Thank you, Laurent. That's a cool package; I think it would work well to generate tables suitable for org-mode spreadsheets. I could even pull data from a sqlite DB, giving me power and portability without needing an internet connection or a full heavyweight spreadsheet app. On Thu, Sep 9, 2021

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
Wow, thank you Simon. That was above and beyond. I should have thought of ~a to start with. With your pointers I came up with a less flexible solution that is sufficient to the current issue: #lang racket/base (require racket/format racket/string) (define my-keys '("bacon" "eggs"