Hi,
I wrote myself this little function:
(define (hash->ordered-list h)
(hash-map h cons #t))
which uses the try-order? argument of hash-map.
Is there a reason for hash->list not have an optional argument try-order?
Or perhaps having such a standalone function would be better?
I was
Okay, good. Thanks for the library recommendation; I'll probably use that
in the future where I need to rename/provide multiple things, but given
that there's only one I did this instead in order to avoid having another
dependency:
(provide do-it)
(define do-it (procedure-rename do-something
I think this is the expected behaviour of `rename-out`; you might want this
library to change the dynamic displayed name:
https://docs.racket-lang.org/static-rename/index.html
--
William J. Bowman
On Tue, Oct 12, 2021 at 03:07:13PM -0400, David Storrs wrote:
> ---
> ; test.rkt
>
---
; test.rkt
#lang racket
(define (do-something) "ok")
(provide do-something)
; test2.rkt
#lang racket
(require "test.rkt")
(provide (rename-out [do-something do-it]))
#lang racket
(require "test2.rkt")
do-it
---
The printed value is # although I was expecting
#. Have
4 matches
Mail list logo