@samth thanks! That package does look more comprehensible.
Is there a way to create a sandboxed function where it cannot access any variable defined outside it’s environment (i.e. can only access arguments and variables defined inside it?) I am refactoring a program and something like this would come in handy.
@aleitch020 has joined the channel
@pocmatos I haven’t had to do that myself, but about using namespaces (https://docs.racket-lang.org/guide/mk-namespace.html)?
i just saw pyret, interesting development
:slightly_smiling_face:
I have a complex data structure that I want to explore in DrRacket. Something like the collapsible view for syntax objects would be perfect (see image below). How do I do it?
Brilliant! Thank you :grinning:
@keith.monihen has joined the channel
Is there a way to convert (-> input-port? any/c)
to a predicate? I see functions for checking arity but not return values.
I guess you can do (lambda (x) (contract-first-order-passes? (-> input-port? any/c) x))
It isn’t possible to know if a function will work with a particular argument without calling it, at least not without knowing its source code and trying to perform some kind of static analysis.
Which is why a contract like (-> input-port? any/c)
will only raise a violation for returning multiple values if the function is actually called.
cool, thanks