Clojureã®coreã©ã¤ãã©ãªã®ä¸ã§ããæ¥å¸¸ã§æ¯è¼ç使ããããªIOç³»ã®é¢æ°ãã¡ãã£ã¨èª¿ã¹ã¦ã¿ã¾ããã read-line æ¨æºå ¥åãã1è¡èªã¿è¾¼ã¿ã¾ãã以ä¸ããµã³ãã«ã (print "type keyword => ") (flush) (def line (read-line)) (print (str "Your typed => " line)) (newline) flushã¯æ¨æºåºåããã©ãã·ã¥ããé¢æ°ãnewlineã¯æ¨æºåºåã«æ¹è¡ãåºåããé¢æ°ã§ãããããå®è¡ããã¨ã以ä¸ã®ãããªå®è¡çµæã¨ãªãã¾ãã type keyword => ããã«ã¡ã¯ãä¸ç Your typed => ããã«ã¡ã¯ãä¸ç type keyword =>ã®å¾ã«ç¶ãã¦ãããããã«ã¡ã¯ãä¸çãã¯ããã¡ããèªåã§å ¥åãããã®ã§ãã ãªããå¤æ°lineã«ãã®æå ¥åãããæååãæç¸ãã¦ãã¾ãã spit ã
Slurping a file in Common Lisp It should be easy to slurp a file. I could think of plenty of ways to do it, but it took a while to come up with something comparable with perl slurping. Here's a rough evolution of my slurp-stream function. You can do anything you like with the code. It's there so you don't have to go through the discovery process I went through. As a test file I used my 5M kernel f
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}