Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 6784d57ea1
Fetching contributors…

Cannot retrieve contributors at this time

132 lines (124 sloc) 27.065 kB
;ELC
;;; Compiled by toups@deluge on Wed May 11 08:14:20 2011
;;; from file /home/toups/elisp/utils/streams.el
;;; in Emacs version 23.1.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
(< (aref emacs-version (1- (length emacs-version))) ?A)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19.29")))
(error "`streams.el' was compiled for Emacs 19.29 or later"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306!\210\307\310\311\312#\210\310\313N\204&\307\310\313\314#\210\300\207" [require cl recur functional monads provide streams put stream-head cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\211\211&\207" [cl-x cl-defsubst-expand (cl-x) (block stream-head (or (and (memq (aref cl-x 0) cl-struct-stream-tags)) (error "stream-head accessing a non-stream")) (aref cl-x 1)) nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'stream-head #[(cl-x) "\302H >\204\f\303\304!\210\305H\207" [cl-x cl-struct-stream-tags 0 error "stream-head accessing a non-stream" 1] 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204\300\304\307\310#\210\300\207" [put stream-head setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander stream stream-head #1=(and (memq (aref cl-x 0) cl-struct-stream-tags)) 1] 6] stream-future cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\211\211&\207" [cl-x cl-defsubst-expand (cl-x) (block stream-future (or #1# (error "stream-future accessing a non-stream")) (aref cl-x 2)) nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'stream-future #[(cl-x) "\302H >\204\f\303\304!\210\305H\207" [cl-x cl-struct-stream-tags 0 error "stream-future accessing a non-stream" 2] 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204\300\304\307\310#\210\300\207" [put stream-future setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander stream stream-future (and #1=(memq (aref cl-x 0) cl-struct-stream-tags)) 2] 6] stream-p cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\211\211&\207" [cl-x cl-defsubst-expand (cl-x) (block stream-p (and (vectorp cl-x) (>= (length cl-x) 3) #1# t)) nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'stream-p #[(cl-x) "\302!\205G\303Y\205\304H >\205\305\207" [cl-x cl-struct-stream-tags vectorp 3 0 t] 2])
(defalias 'copy-stream #[(x) "\301!\207" [x copy-sequence] 2])
(byte-code "\300\301\302\303#\210\301\304N\204\300\301\304\305#\210\300\207" [put make-stream cl-compiler-macro #[(cl-whole &rest #1=#:--cl-rest--) "\305>A@\306>A@ \2038 @\307>\203! AA\211\202\310>A@\203/\311\211\202\312\313 @\"\210\202)\314\315\316\317\f\311 \n&*\207" [#1# head future #:--cl-keys-- cl-whole :head :future (:head :future :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:head :future)" cl-defsubst-expand (head future) (block make-stream (vector 'cl-struct-stream head future)) t] 9 "Not documented\n\n(fn CL-WHOLE &cl-quote &key HEAD FUTURE)"] byte-compile cl-byte-compile-compiler-macro] 4)
#@39 Not documented
(fn &key HEAD FUTURE)
(defalias 'make-stream #[(&rest #1=#:--cl-rest--) "\304>A@\305>A@ \2038 @\306>\203! AA\211\202\307>A@\203/\310\211\202\311\312 @\"\210\202)\313\314 \n#*\207" [#1# head future #2=#:--cl-keys-- :head :future (:head :future :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:head :future)" vector cl-struct-stream] 5 (#$ . 3307)])
(byte-code "\302B\303C\304\305\306\307#\210\304\305\310\311#\210\304\305\312\313#\210\304\305\314\315#\210\304\316\317\315#\210\304\320\317\315#\210\304\321\317\322#\210\304\323\317\315#\210\304\324\317\315#\207" [custom-print-functions cl-struct-stream-tags #[(cl-x cl-s cl-n) "\303!\205PG\304Y\205P\305H >\205P\306\307\n\"\210\306\310\n\"\210\311\305H >\204,\312\313!\210\314H\n\"\210\306\315\n\"\210\311\305H >\204D\312\316!\210\317H\n\"\210\306\320\n\"\210\321\207" [cl-x cl-struct-stream-tags cl-s vectorp 3 0 princ "#S(stream" " head" prin1 error "stream-head accessing a non-stream" 1 " future" "stream-future accessing a non-stream" 2 ")" t] 3] cl-struct-stream put stream cl-struct-slots ((cl-tag-slot) (head) (future)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print t make-stream side-effect-free copy-stream stream-p error-free stream-future stream-head] 4)
(defalias 'stream #[(hd &optional future) "\302\303 #\207" [hd future vector cl-struct-stream] 4])
(defalias 'single-symbol-list\? #[(item) "<\205G\301U\205@9\207" [item 1] 2])
(defalias 'binderish\? #[(item) "<\205G\301U\205@9\207" [item 2] 2])
(defalias 'with-form->binder #[(item) "9\203 \211D\207<\203&\301!\203@B\207\302!\203!\207\303\304\"\207\303\304\"\207" [item single-symbol-list\? binderish\? error "with-forms require symbols, a single symbol list, or a binder-like expression. Got %S."] 3])
#@55 Not documented
(fn EXPR &key (WITH nil) (WITH* nil))
(defalias 'later '(macro . #[(expr &rest #1=#:--cl-rest--) "\305>A@\306>A@ \2038 @\307>\203! AA\211\202\310>A@\203/\311\211\202\312\313 @\"\210\202) \203K\314\315\316 \"\317\f\306\nFE\202_\n\203[\320\315\316\n\"\317\fDE\202_\321\311\fE*\207" [#1# with with* #2=#:--cl-keys-- expr :with :with* (:with :with* :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:with :with*)" lexical-let mapcar with-form->binder later lexical-let* lambda] 7 (#$ . 5165)]))
(defalias 'scar #[(stream) "\204\302\207\303!\203G\304Y\203\305H >\204 \306\307\"\210\305H >\204,\306\310!\210\311H\207" [stream cl-struct-stream-tags nil vectorp 3 0 error "Tried to take the scar of a non-stream %S." "stream-head accessing a non-stream" 1] 3])
(defalias 'scdr #[(stream) "\204\303\207\304!\203G\305Y\203\306H >\204 \307\310\"\210\306H >\204,\307\311!\210\312H\211\205^\313\n!\204?\307\314\n\"\210\n \304\n!\203W\nG\305Y\203W\n\306H >\204\\\307\315\n\"\210\n))\207" [stream cl-struct-stream-tags fut nil vectorp 3 0 error "Tried to take the scdr of a non-stream %S." "stream-future accessing a non-stream" 2 functionp "The future of a stream must be either nil or a function. Instead its %S" "The future of a stream must evaluate to a stream. Instead it was %S"] 4])
(defalias 'stream\? #[(object) "?\206\302!\205G\303Y\205\304H >\205\305\207" [object cl-struct-stream-tags vectorp 3 0 t] 2])
(defalias 'stream-future-nil\? #[(object) "\302\303H >\204 \304\305!\210\306H!\207" [object cl-struct-stream-tags nil\? 0 error "stream-future accessing a non-stream" 2] 3])
(defalias 'stream-with-future\? #[(object) "\302\303H >\204 \304\305!\210\306H!?\207" [object cl-struct-stream-tags nil\? 0 error "stream-future accessing a non-stream" 2] 3])
(defalias 'stream-case '(macro . #[(stream nil-case =a=expressions =a-f=expressions) "\306\307!\310 DC\311\312\313DD\314\315EE\316\317D\nB\320D\310 @@\321DDC ABBD\322D\310\f@@\321DD\f@\211A@)\323DDD\fABBD\324\314\325ED\257F)\207" [stream% stream nil-case =a=expressions =a-f=expressions x gensym "stream%" let if not stream\? error "Stream-case needs a stream input, got instead %S." cond nil\? stream-future-nil\? scar stream-with-future\? stream-future t "Couldn't figure out what to do with stream %S. This should never happen."] 13]))
(defalias 'lex-stream-case '(macro . #[(stream nil-case =a=expressions =a-f=expressions) "\306\307!\310 DC\311\312\313DD\314\315EE\316\317D\nB\320D\321 @@\322DDC ABBD\323D\321\f@@\322DD\f@\211A@)\324DDD\fABBD\325\314\326ED\257F)\207" [stream% stream nil-case =a=expressions =a-f=expressions x gensym "stream%" let if not stream\? error "Stream-case needs a stream input, got instead %S." cond nil\? stream-future-nil\? lexical-let scar stream-with-future\? stream-future t "Couldn't figure out what to do with stream %S. This should never happen."] 13]))
#@2 
(defalias 'take-n #[(stream n &optional acc) "\306\307 \203}\307\n\310U\203\311 !\202y\f\312 !\204#\313\314 \"\210\315 !\203/\311 !\202x\316 !\203D\317 !\311 B!)\202x\320 !\203t\317 ! \310H>\204Z\313\321!\210 \322H\306 \nS B*\307\202x\313\323 \")\202*\207" [#1=#:return-value43315 #2=#:loop-sentinal43314 n acc stream #3=#:stream%43316 t nil 0 reverse stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream-with-future\? "stream-future accessing a non-stream" 2 "Couldn't figure out what to do with stream %S. This should never happen." a cl-struct-stream-tags f] 4 (#$ . 8168)])
(defalias 'smapcar #[(f stream) "\306 !\204 \307\310 \"\210\311 !\203\312\202w\313 !\203+\314 !\300 \n!\312\")\202w\315 !\203s\314 ! \316H\f>\204@\307\317!\210 \320H\321\322!\321\323!\211 L\210 L\210\300J\n!\324\325\326\327\330D\330D\331\257E\",\202w\307\332 \")\207" [stream #1=#:stream%43320 a f cl-struct-stream-tags future stream\? error "Stream-case needs a stream input, got instead %S." nil\? nil stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 make-symbol "--future--" "--f--" lambda (&rest --cl-rest--) apply #[(#2=#:G43321 #3=#:G43322) "\302J J \"\207" [#2# #3# smapcar] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." #4=#:--cl-f-- #5=#:--cl-future--] 10])
(defalias 'smapcar2 #[(f-of-2 stream1 stream2) "\306 !\204 \307\310 \"\210\311 !\203\312\202:\313 !\203~\314 ! \306\f!\204.\307\310\f\"\210\311\f!\2038\312\202z\313\f!\203N\314\f!\315\n \"\312\")\202z\316\f!\203v\314\f!\f\317H>\204d\307\320!\210\f\321H\315\n \"\312\"*\202z\307\322\f\"*\202:\316 !\2036\314 ! \317H>\204\224\307\320!\210 \321H  !\306!!\204\252\307\310!\"\210\311!!\203\265\312\2022\313!!\203\315\314!!\315\n \"\312\")\2022\316!!\203-\314!!!\317H>\204\346\307\320!\210!\321H\323\324!\323\325!\323\326!\"#\211$L\210# L\210\"L\210\315$J\n \"\327\330\331\332\333\"D\333#D\333$D\334\257E\"-\2022\307\322!\"+\202:\307\322 \")\207" [stream1 #1=#:stream%43323 a stream2 #2=#:stream%43324 b stream\? error "Stream-case needs a stream input, got instead %S." nil\? nil stream-future-nil\? scar stream stream-with-future\? 0 "stream-future accessing a non-stream" 2 "Couldn't figure out what to do with stream %S. This should never happen." make-symbol "--f-of-2--" "--f--" "--g--" lambda (&rest --cl-rest--) apply #[(#3=#:G43326 #4=#:G43327 #5=#:G43328) "\303J J \nJ #\207" [#5# #4# #3# smapcar2] 4] quote --cl-rest-- f-of-2 cl-struct-stream-tags g f #6=#:stream%43325 #7=#:--cl-g-- #8=#:--cl-f-- #9=#:--cl-f-of-2--] 11])
(byte-code "\301B\302\301!\204\303\301\304\305\306\"\"\210\301\207" [current-load-list ones default-boundp set-default stream 1 #[nil "\207" [ones] 1]] 5)
(defalias 'ints-from #[(n) "\302\303!\211 L\210\304J\305\306\307\310\311D\312FE\")\207" [#1=#:--cl-n-- n make-symbol "--n--" stream lambda (&rest --cl-rest--) apply #[(#2=#:G43329) "\301JT!\207" [#2# ints-from] 2] quote --cl-rest--] 9])
(defalias 'ints-down-from #[(n) "\302\303!\211 L\210\304J\305\306\307\310\311D\312FE\")\207" [#1=#:--cl-n-- n make-symbol "--n--" stream lambda (&rest --cl-rest--) apply #[(#2=#:G43330) "\301JS!\207" [#2# ints-down-from] 2] quote --cl-rest--] 9])
(defalias 'forever #[(value) "\302\303!\211 L\210\304J\305\306\307\310\311D\312FE\")\207" [#1=#:--cl-value-- value make-symbol "--value--" stream lambda (&rest --cl-rest--) apply #[(#2=#:G43331) "\301J!\207" [#2# forever] 2] quote --cl-rest--] 9])
(defalias 'combine-by-call #[(f-stream arg-stream) "\302\303 #\207" [f-stream arg-stream smapcar2 funcall] 4])
(defalias 'combine-by-partial-right #[(f-stream arg-stream) "\302\303 #\207" [f-stream arg-stream smapcar2 par] 4])
(defalias 'smapcar* #[(f &rest streams) "\306\307\310\311\n! @\" A \2033\307\fG\312U\203#\313\314 \"\202/\306\310 \f@\"\fA\307\202**\207" [#1=#:recur-loop-return-value-43333 #2=#:recur-loop-sentinal-43332 f streams rest partial-stream t nil combine-by-partial-right forever 0 smapcar funcall] 4])
(defalias 'repeating #[(seq) "\302\303!\211 L\210\304J@\305\306\307\310\311D\312FE\")\207" [#1=#:--cl-seq-- seq make-symbol "--seq--" stream lambda (&rest --cl-rest--) apply #[(#2=#:G43334) "\301\302JAJ@\"!\207" [#2# repeating suffix] 4] quote --cl-rest--] 9])
#@64 Not documented
(fn LIM &optional (STATE (make-random-state)))
(defalias 'random-numbers #[(lim &rest #1=#:--cl-rest--) "\203\f\211A@\202\306 \203\307\310\311\312G\\D\"\210 \313 !\314\315!\314\316!\211\306 L\210 L\210\317\f\320\321\322\323\324 D\324D\325\257E\"-\207" [#1# state *random-state* lim val #2=#:--cl-lim-- make-random-state signal wrong-number-of-arguments random-numbers 2 random* make-symbol "--new-state--" "--lim--" stream lambda (&rest --cl-rest--) apply #[(#3=#:G43335 #4=#:G43336) "\302J J\"\207" [#3# #4# random-numbers] 3] quote --cl-rest-- #5=#:--cl-new-state--] 10 (#$ . 12648)])
#@33 The stream of fibonocci numbers
(defvar fibs (stream 1 #[nil "\300\301\302\"\207" [stream 1 #[nil "\301\302\303!#\207" [fibs smapcar2 + scdr] 5]] 3]) (#$ . 13278))
(defalias 'stream-cat #[(stream1 stream2) "\306 !\204 \307\310 \"\210\311 !\203\n\202}\312 !\203\261\313 !\n\306\f!\204.\307\310\f\"\210\311\f!\203;\314 \315\"\202\255\312\f!\203a\313\f!\314 \316\317!\211! L\210\320\321\322\323\324!D\325FE)\")\202\255\326\f!\203\251\313\f!\f\327H\">\204w\307\330!\210\f\331H#\314 \316\317!\316\332!$\211% L\210$#L\210\320\321\322\333\324$D\324%D\325\257E*\"*\202\255\307\334\f\"*\202}\326 !\203y\313 ! \327H\">\204\307\307\330!\210 \331H&\n'\306'!\204\335\307\310'\"\210\311'!\203\354\314 &\"\202u\312'!\203$\313'!\314 \316\335!\316\336!(\211)&L\210(\nL\210\320\321\322\337\324(D\324)D\325\257E*\")\202u\326'!\203p\313'!'\327H\">\204=\307\330!\210'\331H#\314 \316\335!\316\336!*\211+&L\210*\nL\210\320\321\322\340\324*D\324+D\325\257E*\"*\202u\307\334'\"+\202}\307\334 \")\207" [stream1 #1=#:stream%43337 stream2 a #2=#:stream%43338 b stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream nil make-symbol "--b--" lambda (&rest --cl-rest--) apply #[(#3=#:G43339) "\301J\302\"\207" [#3# stream nil] 3] quote --cl-rest-- stream-with-future\? 0 "stream-future accessing a non-stream" 2 "--g--" #[(#4=#:G43340 #5=#:G43341) "\302J J\"\207" [#5# #4# stream] 3] "Couldn't figure out what to do with stream %S. This should never happen." "--f--" "--stream2--" #[(#6=#:G43343 #7=#:G43344) "\302J J\"\207" [#7# #6# stream-cat] 3] #[(#8=#:G43345 #9=#:G43346) "\302J J\"\207" [#9# #8# stream-cat] 3] #10=#:--cl-b-- cl-struct-stream-tags g #11=#:--cl-g-- #12=#:--cl-b-- f #13=#:stream%43342 #14=#:--cl-stream2-- #15=#:--cl-f-- #16=#:--cl-stream2-- #17=#:--cl-f--] 10])
(defalias 'stream-interleave #[(stream1 stream2) "\306 !\204 \307\310 \"\210\311 !\203\n\202\214\312 !\203\261\313 !\n\306\f!\204.\307\310\f\"\210\311\f!\203;\314 \315\"\202\255\312\f!\203a\313\f!\314 \316\317!\211 L\210\320\321\322\323\324 D\325FE)\")\202\255\326\f!\203\251\313\f!\f\327H!>\204w\307\330!\210\f\331H\"\314 \316\317!\316\332!#\211$ L\210#\"L\210\320\321\322\333\324#D\324$D\325\257E*\"*\202\255\307\334\f\"*\202\214\326 !\203\210\313 ! \327H!>\204\307\307\330!\210 \331H%\n&\306&!\204\335\307\310&\"\210\311&!\203\354\314 %\"\202\204\312&!\203$\313&!\314 \316\317!\316\335!'\211( L\210'%L\210\320\321\322\336\324'D\324(D\325\257E*\")\202\204\326&!\203\313&!&\327H!>\204=\307\330!\210&\331H\"\314 \316\317!\316\332!\316\335!)*\211+ L\210*\"L\210)%L\210\320\321\322\337\324)D\324*D\324+D\325\257E+\"*\202\204\307\334&\"+\202\214\307\334 \")\207" [stream1 #1=#:stream%43347 stream2 a #2=#:stream%43348 b stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream nil make-symbol "--b--" lambda (&rest --cl-rest--) apply #[(#3=#:G43349) "\301J\302\"\207" [#3# stream nil] 3] quote --cl-rest-- stream-with-future\? 0 "stream-future accessing a non-stream" 2 "--g--" #[(#4=#:G43350 #5=#:G43351) "\302J J\"\207" [#5# #4# stream] 3] "Couldn't figure out what to do with stream %S. This should never happen." "--f--" #[(#6=#:G43353 #7=#:G43354) "\302J J\"\207" [#7# #6# stream] 3] #[(#8=#:G43355 #9=#:G43356 #10=#:G43357) "\303\304J J\"\nJ \"\207" [#10# #9# #8# stream-interleave stream] 4] #11=#:--cl-b-- cl-struct-stream-tags g #12=#:--cl-g-- #13=#:--cl-b-- f #14=#:stream%43352 #15=#:--cl-f-- #16=#:--cl-b-- #17=#:--cl-f-- #18=#:--cl-g-- #19=#:--cl-b--] 11])
(defalias 'stream-cat-tail #[(head-stream tail) "\306!\203{\306 !\204\307\310 \"\210\311 !\203\n \202y\312 !\2030\313 !\314 \n\")\202y\315 !\203u\313 ! \316H\f>\204E\307\317!\210 \320H\314 \321\322!\321\323!\211 L\210\nL\210\324\325\326\327\330D\330D\331\257E*\"*\202y\307\332 \")\207\333 \n\"\207" [head-stream #1=#:stream%43358 tail a cl-struct-stream-tags f stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream stream-with-future\? 0 "stream-future accessing a non-stream" 2 make-symbol "--f--" "--tail--" lambda (&rest --cl-rest--) apply #[(#2=#:G43359 #3=#:G43360) "\302J J\"\207" [#3# #2# stream-cat-tail] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." stream-cat-tail #4=#:--cl-tail-- #5=#:--cl-f--] 10])
(defalias 'stream-interleave-tail #[(head-stream tail) "\306!\205z\306 !\204\307\310 \"\210\311 !\203\n \202y\312 !\2030\313 !\314 \n\")\202y\315 !\203u\313 ! \316H\f>\204E\307\317!\210 \320H\314 \321\322!\321\323!\211\nL\210 L\210\324\325\326\327\330D\330D\331\257E*\"*\202y\307\332 \")\207" [head-stream #1=#:stream%43361 tail a cl-struct-stream-tags f stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream stream-with-future\? 0 "stream-future accessing a non-stream" 2 make-symbol "--tail--" "--f--" lambda (&rest --cl-rest--) apply #[(#2=#:G43362 #3=#:G43363) "\302J J\"\207" [#3# #2# stream-interleave-tail] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." #4=#:--cl-f-- #5=#:--cl-tail--] 10])
(defalias 'stream-map-cat-tail #[(mf instream) "\306 !\204 \307\310 \"\210\311 !\203\312\202x\313 !\203(\314 ! \n!)\202x\315 !\203t\314 ! \316H\f>\204=\307\317!\210 \320H\321 \n\"\322\323\324!\323\325!\211 L\210 L\210\326\327\330\331\332D\332D\333\257E*\"+\202x\307\334 \")\207" [instream #1=#:stream%43364 a mf cl-struct-stream-tags f stream\? error "Stream-case needs a stream input, got instead %S." nil\? nil stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 par stream-cat-tail make-symbol "--mf--" "--f--" lambda (&rest --cl-rest--) apply #[(#2=#:G43365 #3=#:G43366) "\302J J \"\207" [#3# #2# stream-map-cat-tail] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." tail #4=#:--cl-f-- #5=#:--cl-mf--] 10])
(defalias 'stream-map-cat #[(mf instream) "\306 !\204 \307\310 \"\210\311 !\203\312\202x\313 !\203(\314 ! \n!)\202x\315 !\203t\314 ! \316H\f>\204=\307\317!\210 \320H\321 \n\"\322\323\324!\323\325!\211 L\210 L\210\326\327\330\331\332D\332D\333\257E*\"+\202x\307\334 \")\207" [instream #1=#:stream%43367 a mf cl-struct-stream-tags f stream\? error "Stream-case needs a stream input, got instead %S." nil\? nil stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 par stream-cat-tail make-symbol "--mf--" "--f--" lambda (&rest --cl-rest--) apply #[(#2=#:G43368 #3=#:G43369) "\302J J \"\207" [#3# #2# stream-map-cat] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." tail #4=#:--cl-f-- #5=#:--cl-mf--] 10])
(defalias 'stream-map-interleave #[(mf instream) "\306 !\204 \307\310 \"\210\311 !\203\312\202x\313 !\203(\314 ! \n!)\202x\315 !\203t\314 ! \316H\f>\204=\307\317!\210 \320H\321 \n\"\322\323\324!\323\325!\211 L\210 L\210\326\327\330\331\332D\332D\333\257E*\"+\202x\307\334 \")\207" [instream #1=#:stream%43370 a mf cl-struct-stream-tags f stream\? error "Stream-case needs a stream input, got instead %S." nil\? nil stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 par stream-interleave-tail make-symbol "--mf--" "--f--" lambda (&rest --cl-rest--) apply #[(#2=#:G43371 #3=#:G43372) "\302J J \"\207" [#3# #2# stream-map-interleave] 3] quote --cl-rest-- "Couldn't figure out what to do with stream %S. This should never happen." tail #4=#:--cl-f-- #5=#:--cl-mf--] 10])
(defalias 'stream-bind #[(v f) "\302 \"\207" [f v stream-map-cat] 3])
(defalias 'stream-bind^i #[(v f) "\302 \"\207" [f v stream-map-interleave] 3])
(defalias 'stream-return #[(x) "\301\302\"\207" [x stream nil] 3])
(byte-code "\302\303\304\305\306\307\310&\302\303\311\305\306\307\310&\310\207" [monad-stream monad-stream^i tbl! :m-bind stream-bind :m-return stream-return :m-zero nil stream-bind^i] 7)
(defalias 'map-inf #[(n p stream) "\303\304 \n\"\"\207" [p stream n mapcar take-n] 5])
(byte-code "\306 \307\"\310 !\204\311\312!\210\313\314!\211\205\314K\315\216\314\316M\210\313\317!\211\205,\317K,\320\216\317\321M\210\313\322!\211-\205?\322K.\323\216\322\324M\210\313\325!\211/\205R\325K0\326\216\325\327M\210\330\331!\2111 L\210\330\332!\2112\3061J\307\"L\210\3101J!\204}\311\312!\210\330\333!\330\334!\330\335!\330\336!345\2116\337L\2105\337L\2104\337L\2103\337L\2106\340\341\342\343\3443D\3444D\3445D\3446D\3442D\3441D\345\257 EL\2105\340\341\342\346\3443D\3444D\3445D\3446D\3442D\3441D\345\257 EL\2104\340\341\342\347\3443D\3444D\3445D\3446D\3442D\3441D\345\257 EL\2103\340\341\342\350\3443D\3444D\3445D\3446D\3442D\3441D\345\257 EL\2103J\351\352!\340\341\342\353\3443D\3444D\3445D\3446D\3442D\3441D\345\257 E\".7\337\207" [monad-stream current-monad m-zero #1=#:--cl-letf-bound-- #2=#:--cl-letf-save-- #3=#:--cl-letf-bound-- tbl :m-zero monad\? error "Expected a monad in an mlet or similar form. \nA monad is a hash table with m-return and m-bind forms." fboundp m-bind ((byte-code "\203 \302 M\210\202\303\302!\210\302\207" [#1# #2# m-bind fmakunbound] 2)) #[(v f) "\303\304\" \n\"\207" [current-monad v f tbl :m-bind] 3] m-return ((byte-code "\203 \302 M\210\202\303\302!\210\302\207" [#3# #4=#:--cl-letf-save-- m-return fmakunbound] 2)) #[(v) "\302\303\" !\207" [current-monad v tbl :m-return] 3] >>= ((byte-code "\203 \302 M\210\202\303\302!\210\302\207" [#5=#:--cl-letf-bound-- #6=#:--cl-letf-save-- >>= fmakunbound] 2)) #[(v f) "\303\304\" \n\"\207" [current-monad v f tbl :m-bind] 3] m-plus ((byte-code "\203 \302 M\210\202\303\302!\210\302\207" [#7=#:--cl-letf-bound-- #8=#:--cl-letf-save-- m-plus fmakunbound] 2)) #[(mv1 mv2) "\303\304\" \n\"\207" [current-monad mv1 mv2 tbl :m-plus] 3] make-symbol "--current-monad--" "--m-zero--" "----cl-var--43376--" "----cl-var--43375--" "----cl-var--43374--" "----cl-var--43373--" nil lambda #9=(&rest --cl-rest--) apply #[(#:G43377 #:G43378 #:G43379 #:G43380 #:G43381 #10=#:G43382 mv1 mv2) "\303J\304\" \n\"\207" [#10# mv1 mv2 tbl :m-plus] 3] quote --cl-rest-- #[(#:G43383 #:G43384 #:G43385 #:G43386 #:G43387 #11=#:G43388 v f) "\303J\304\" \n\"\207" [#11# v f tbl :m-bind] 3] #[(#:G43389 #:G43390 #:G43391 #:G43392 #:G43393 #12=#:G43394 v) "\302J\303\" !\207" [#12# v tbl :m-return] 3] #[(#:G43395 #:G43396 #:G43397 #:G43398 #:G43399 #13=#:G43400 v f) "\303J\304\" \n\"\207" [#13# v f tbl :m-bind] 3] random-numbers 1.0 #[(#14=#:G43418 #15=#:G43419 #16=#:G43420 #17=#:G43421 #18=#:G43422 #19=#:G43423 u) "\306\307!\211 L\210\nJ\310\311\312\313!\"\314\315\316\317\320D\320\nD\320 D\320\fD\320 D\320D\320D\321\257\nE\")\207" [#:--cl-u-- u #14# #15# #16# #17# make-symbol "--u--" random-numbers 1.0 make-random-state t lambda #9# apply #[(#20=#:G43411 #21=#:G43412 #22=#:G43413 #23=#:G43414 #24=#:G43415 #25=#:G43416 #26=#:G43417 v) "\306\307!\211 L\210\306\310!\306\311!\211\312\313\fJ!\314_!L\210\n\315 J\316#L\210\317 J\320\nJ!_\321\322\323\324\325\nD\325 D\325D\325\fD\325D\325D\325D\325D\325D\325D\326\257 E\"+\207" [#:--cl-v-- v #:--cl-s-- #:--cl-r-- #20# pi make-symbol "--v--" "--r--" "--s--" sqrt log -2 * 2 stream cos lambda #9# apply #[(#27=#:G43401 #28=#:G43402 #:G43403 #:G43404 #:G43405 #:G43406 #:G43407 #:G43408 #:G43409 #:G43410) "\302J\303 J!_\304\"\207" [#28# #27# stream sin nil] 4] quote --cl-rest-- #21# #22# #23# #24# #25# #26#] 18] quote --cl-rest-- #18# #19#] 15] #4# #5# #6# #7# #8# #:--cl-current-monad-- #:--cl-m-zero-- #:--cl---cl-var--43373-- #:--cl---cl-var--43374-- #:--cl---cl-var--43375-- #:--cl---cl-var--43376-- normal-numbers] 14)
(defalias 'list->stream #[(list) "\303@A\211\205\304\305!\211 L\210\306\307\310\311\312\nD\313FE))\"\207" [list rest #1=#:--cl-rest-- stream make-symbol "--rest--" lambda (&rest --cl-rest--) apply #[(#2=#:G43424) "\301J!\207" [#2# list->stream] 2] quote --cl-rest--] 9])
(defalias 'zip-streams #[(&rest streams) "\301\302\303#\207" [streams apply smapcar* list] 4])
#@2 
(defalias 'take-until #[(stream predicate &optional acc) "\306\307 \203\212\307\n\310 !\204\311\312 \"\210\313 !\203#\314\f!\202\205\315 !\203C\316 ! !\203<\314 \fB!\202?\314\f!)\202\205\317 !\203\201\316 ! \320H>\204Y\311\321!\210 \322H !\203n\314 \fB!\202}\306\323\n! \fB\307*\202\205\311\324 \")\202*\207" [#1=#:return-value43426 #2=#:loop-sentinal43425 stream #3=#:stream%43427 acc a t nil stream\? error "Stream-case needs a stream input, got instead %S." nil\? reverse stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 scdr "Couldn't figure out what to do with stream %S. This should never happen." predicate cl-struct-stream-tags f] 4 (#$ . 25651)])
#@2 
(defalias 'remove-until #[(stream predicate) "\306\307 \203u\307\n\310 !\204\311\312 \"\210\313 !\203!\307\202p\314 !\2039\315 ! \f!\2055\302\f\307\")\202p\316 !\203l\315 ! \317H>\204O\311\320!\210 \321H \f!\203_\n\202h\306 \322\n!\307*\202p\311\323 \")\202*\207" [#1=#:return-value43432 #2=#:loop-sentinal43431 stream #3=#:stream%43433 a predicate t nil stream\? error "Stream-case needs a stream input, got instead %S." nil\? stream-future-nil\? scar stream-with-future\? 0 "stream-future accessing a non-stream" 2 scdr "Couldn't figure out what to do with stream %S. This should never happen." cl-struct-stream-tags f] 3 (#$ . 26393)])
Jump to Line
Something went wrong with that request. Please try again.