@juanesgonzalez746 has joined the channel
hello colleagues, can someone help me with a workshop?
@ahnaaf20 has joined the channel
I have been using define-vector-wraps
from racket/private/vector-wraps
in a manner identical to https://github.com/racket/racket/blob/46a191df038244199f83f2bb1235beb8ca137f9a/racket/collects/data/bit-vector.rkt\|bit-vectors but I switched the language to #racket/unit
and the define-vector-wraps
now causes the classic error: ?: literal data is not allowed; no #%datum syntax transformer is bound in the transformer phase in: “packed-vectors”. Is there a way around that?
Have you been taught the design recipe? What does the function accept? • A list of (lists of chars ) • a list of chars The next question is What does the function do?
A list of (lists of chars)
The function will be used in a hangman game to give some hints
Can you post the code you have thus far?
Some questions to consider: 1. Do you want to return all lists that match, or just the first one? 2. What does it mean to “match”? From your example it looks like it matches if the second argument is a prefix of one of the lists, right?
Was your module previously in #lang racket?
If so, you probably need to (require (for-syntax racket/base))
All the list that matches
So far I did
(define extract–2 ( lambda (li arg) (filter(curry memv arg) li)))
But it works with just character #\b but I want to match it with list ‘(#\b) and it can be more than one like ‘(#\b #\a). It should match the lost that has all elements of this list and give out that list as an output
List of ( list of chars ) is being used
@badkins