juanesgonzalez746
2021-3-17 20:34:06

@juanesgonzalez746 has joined the channel


juanesgonzalez746
2021-3-17 20:34:41

hello colleagues, can someone help me with a workshop?


ahnaaf20
2021-3-17 20:56:56

@ahnaaf20 has joined the channel


raoul.schorer
2021-3-17 21:40:33

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?


spdegabrielle
2021-3-18 00:01:07

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?


ahnaaf20
2021-3-18 00:12:51

A list of (lists of chars)


ahnaaf20
2021-3-18 00:15:02

The function will be used in a hangman game to give some hints


badkins
2021-3-18 01:03:39

Can you post the code you have thus far?


badkins
2021-3-18 01:07:12

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?


samth
2021-3-18 01:12:51

Was your module previously in #lang racket?


samth
2021-3-18 01:13:25

If so, you probably need to (require (for-syntax racket/base))


ahnaaf20
2021-3-18 01:23:35

All the list that matches


ahnaaf20
2021-3-18 01:26:05

So far I did

(define extract–2 ( lambda (li arg) (filter(curry memv arg) li)))


ahnaaf20
2021-3-18 01:29:43

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


ahnaaf20
2021-3-18 01:30:13

List of ( list of chars ) is being used


ahnaaf20
2021-3-18 01:37:53

@badkins