在https://www.thc.org/root/phun/unmaintain.html中, Lisp被认为是这样,"LISP is a dream language for the writer of unmaintainable code."然后继续提供一些代码示例.在最近的黑客新闻评论中,这些被认为是" 任何知道口齿不清的人在一秒钟之内就可以阅读和理解的东西 ".
My question is, as someone with only a very small bit of experience in Clojure — what do they mean?
(lambda (*<8-]= *<8-[= ) (or *<8-]= *<8-[= ))
I imagine that some of this syntax means something like the #(blah %) syntax from clojure, right?
(defun :-] (<) (= < 2))
Mostly lost here. Defining a function called :-] that takes an argument …
在本文中,它使用以下方法.
h = {}
def h.[]=(k, v)
puts "Setting hash key #{k} with #{v.inspect}"
super
end
# 1. The standard ||= approach
h[:x] ||= 10
h[:x] ||= 20
...
Run Code Online (Sandbox Code Playgroud)
我知道这是一个像这样的二传手=( ).
def noise=(noise)
@noise = noise
end
Run Code Online (Sandbox Code Playgroud)
Q1.但我不确定.[]是做什么的.
Q2.你可以[]在Ruby方法名中使用或使用其他非字母表吗?