[racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-26 Thread philipp . thiess1999
Am Sonntag, 25. Juni 2017 14:24:27 UTC+2 schrieb philipp.t...@gmail.com: > Hello today I made a translator for drRakket cause its a task of my teacher. > > > > I did it for one word but now I have to make it with a whole setence. I know > I have to work with cons somehow but I just dont get

Re: [racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Matthias Felleisen
> On Jun 25, 2017, at 4:28 PM, Philip McGrath wrote: > > At this point it is mostly a question of how restrictive your teacher wishes > to be by requiring that you implement this as a single function. If you are > using full Racket, it is possible to define a helper

Re: [racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Philip McGrath
At this point it is mostly a question of how restrictive your teacher wishes to be by requiring that you implement this as a single function. If you are using full Racket, it is possible to define a helper function inside of a larger function. Here is the most direct way to translate your existing

[racket-users] Re: I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread philipp . thiess1999
Thanks guys I got a solution! #lang racket (define *lex* '((catgato katze) (dog perro hund) (eats come frisst) (jumps salte springt) (the el die))) (define (translator wort lexikon sprache) (cond ((null? lexikon) '(Wort wurde nicht gefunden)) ((or