Closed EuAndreh closed 8 years ago
I couldn't get $map-reduce to work properly. I'm not sure if I'm doing anything wrong or the ParenScript is blocking me:
$map-reduce
(dotimes (i 3) (let ((doc (make-document))) (add-element "mykey" "xxx" doc) (db.insert "mycoll" doc))) ; => NIL (defjs my-map () (emit this.mykey)) ; in: CL-MONGO:DEFJS MY-PACKAGE::MY-MAP ; (PARENSCRIPT:PS ; (LAMBDA () (MY-PACKAGE::EMIT MY-PACKAGE::THIS.MY-KEY))) ; ; caught WARNING: ; Symbol THIS.MY-KEY contains one of '.[]' - this compound naming convention is no longer supported by Parenscript! ; ; compilation unit finished ; caught 1 WARNING condition STYLE-WARNING: redefining MY-PACKAGE::MY-MAP in DEFUN ; => MY-MAP (defjs my-reduce (k vals) (return vals)) ; in: DEFJS MY-REDUCE ; (PARENSCRIPT:PS ; (LAMBDA (MY-PACKAGE::K MY-PACKAGE::VALS) (RETURN MY-PACKAGE::VALS))) ; ; caught WARNING: ; Returning from unknown block nilBlock ; ; compilation unit finished ; caught 1 WARNING condition STYLE-WARNING: redefining MY-PACKAGE::MY-REDUCE in DEFUN ; => MY-REDUCE (mr.p ($map-reduce "mycoll" #'my-map #'my-reduce)) ; => ((36 128 0 1 8 0 0 0 "mr.mycoll") NIL)
Is this a ParenScript problem or I'm doing something wrong?
I couldn't get
$map-reduce
to work properly. I'm not sure if I'm doing anything wrong or the ParenScript is blocking me:Is this a ParenScript problem or I'm doing something wrong?