nicholasbs/statemachines — comment on commit 4fc7e8d6e8b7414c8f30a2ad7f2a4be01f049fec
File: pda.ss line 32
By nicholasbs:

Makes perfect sense, thanks!

On Wed, Oct 19, 2011 at 8:30 AM, Andrew Gwozdziewycz

wrote:
> You shouldn't use `'()` in place of #f when it comes to returning a boolean constant; that is to say, `member` shouldn't return `#f` on failure if it returns the `cdr` of the list that includes the found item as it's `car`. But, in situations where you are creating predicates, it's advisable to return a boolean, like you were doing. However, there's already a predicate that you can use to get the desired effect: `null?` Therefore: `(null? (member state (get-accept-states pda))` would be the most idiomatic.
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/nicholasbs/statemachines/commit/4fc7e8d6e8b7414c8f30a2ad7f2a4be01f049fec#commitcomment-660954
>