In a more functional way:
(de proc-char (C)
(case C
("B" 1)
("R" 1)
("F" 0)
("L" 0)))
(de proc-str (S)
(pack (mapcar 'proc-char S)))
(de proc-file (F)
(let Inp (filter 'and (split (in F (till)) "\n"))
(mapcar 'proc-str Inp)))
(println (proc-file "5.input"))
If you need some help with the exercises:
https://github.com/dbertolotto/advent-of-code-2020
Regards,
Davide
On Fri, Jan 15, 2021, 19:29 Mike <[email protected]> wrote:
> January 15, 2021 7:21 PM, "Christos Gitsis" <[email protected]> wrote:
>
>
> >
> > Is there a way to do this and get the result:
> > -> ("0001110111" "1000110111" "1100110100")
> > ?
>
> https://envs.sh/BF.l
>
> This is my code how i *feel* this task.
>
> (mike)
>
> --
> UNSUBSCRIBE: mailto:[email protected]?subjectUnsubscribe
>
>