guicho271828 / trivia

Pattern Matcher Compatible with Optima
Other
334 stars 22 forks source link

Fix: property pattern fails if plist value is null #28

Closed ghost closed 8 years ago

ghost commented 8 years ago

Currently, the property pattern returns the default if getf returns null, even if the value under the property is explicitly 'nil'.

(match '(:export nil)
  ((property :export export 1) export))
=> 1

This patch fixes this bug.

guicho271828 commented 8 years ago

thanks, nice point!