Hello,
I don't think this is what im looking for, but thank you very much :D 

A segunda-feira, 28 de setembro de 2020 à(s) 20:31:11 UTC+1, gneuner2 
escreveu:

>
> On 9/28/2020 10:50 AM, Beatriz Moreira wrote:
>
> Hello, 
> I would like to know how do I match multiple variables to a regular 
> expression.
> My idea is to match every *f* variables (f...) to an *f* in ((contract C 
> ((T x) ...) ((T f)) ...) ... ).
> I am trying to implement a core language for smart contracts in Racket, 
> but I need to have as pre condition in my reduction rules that the *f* is 
> a function in one of the contracts.
> Thank you! :) 
>
>
> 'regexp-match*' outputs a list of matched strings, and match has an apply 
> clause: '(app *expr* pats ...)' which evaluates *expr* and tries to match 
> the output.  My first thought would be to try something like:
>
>   match ( inp )
>     :
>     ((app (regexp-match* pattern inp) match1 match2 ... )
>        ... )
>     :
>
> Caveat ... I've never tried to do this.  If match doesn't like this 
> approach (or something close to it), then I would separately perform the 
> regexp-match* and the pattern match on its output list.
>
> Hope this helps,
> George
>
> https://docs.racket-lang.org/reference/regexp.html
> https://docs.racket-lang.org/reference/match.html
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/3d0e5945-a81e-4424-99c5-96f6d0b7b198n%40googlegroups.com.

Reply via email to