Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Mark Carroll Newsgroups: comp.lang.haskell Subject: Re: how to use dynamic variable programming in haskell? Date: Thu, 06 Oct 2016 09:53:09 +0100 Organization: none Lines: 23 Message-ID: <87fuo9uadm.fsf@ixod.org> References: <210c7a80-235b-4c56-9bb8-1b2872626986@googlegroups.com> <87r37tgb7m.fsf@ixod.org> <8594409c-d02f-4bd3-855a-017c3466757c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1b3e5cba9e4d07a53741e6f3d1717925"; logging-data="9459"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9NgRcH9VDVnxRzq8NM3CK" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cancel-Lock: sha1:hiF4w4L/oHk+MZVY91vWBlimF8w= sha1:BYSV6fPZudoUnVEO6vVB69FQvZA= Xref: csiph.com comp.lang.haskell:463 On 06 Oct 2016, Ho Yeung Lee wrote: > i can parse already and got exactly which digit it return in espresso, > > i only do not know how to dynamic create variables > > if 3 variables, for example it will be a == 1 && b == 0 && c == 0 > > if 4 variables, for example it will be a == 0 && b == 1 && c == 0 && d == 1 > > but without > let a = > let b = > let c = > > assignment before it write into expression of if statement. > > how to create this dynamic statement for if statement use ? Maybe it would be better to just keep them in a list? Might your if statement do better as pattern-matching? -- Mark