Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the #M dispatch function in the series package?

Tags:

common-lisp

I am trying to understand the basics of the series library and am studying the examples in the CL Cookbook

But if I try to evaluate one of this examples

SERIES> (collect
          (#Mlist (scan '(a b c))
                  (scan '(1 2 3))))

I get the following error from SBCL 2.03:

no dispatch function defined for #\M

  Line: 2, Column: 15, File-Position: 23

  Stream: #<SB-IMPL::STRING-INPUT-STREAM {1004122F53}>
   [Condition of type SB-INT:SIMPLE-READER-ERROR]

I loaded series using quicklisp and don't get where the dispatch function #M should be defined. Could someone please give me a hint?

like image 586
Martin Buchmann Avatar asked Nov 19 '25 10:11

Martin Buchmann


1 Answers

Reader macros for libraries typically need to be enabled explicitly.

According to the RELEASE-NOTES:

You can use SERIES::INSTALL for "use-package"ing Series in a way that extended special forms are shadow-import'ed and reader macros are installed.

I'm not sure why that is not exported.

I have not yet found a named-readtables definition for series, but I'd guess that someone has done that alredy.

like image 193
Svante Avatar answered Nov 22 '25 05:11

Svante



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!