1. Nikhil Marathe
  2. newlisp-redis

Commits

Nikhil Marathe  committed 49de7c7

Added post processing for INFO and EXISTS

  • Participants
  • Parent commits dea0a84
  • Branches default

Comments (0)

Files changed (1)

File redis.lsp

View file
 (define (postprocess cmd reply)
   (cond
     ((= cmd "keys") (parse reply " "))
+    ((= cmd "info") (map (curry flipped-parse ":") (parse reply "\r\n")))
+    ((= cmd "exists") (!= 0 reply))
     (true reply)))
 
+(define (flipped-parse delim str)
+  (parse str delim))
+
 (context MAIN)
 
 ;; @syntax (redis [host] [port])