相关疑难解决方法(0)

这个Lisp代码是什么意思?

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?

  1. (lambda (*<8-]= *<8-[= ) (or *<8-]= *<8-[= ))

    I imagine that some of this syntax means something like the #(blah %) syntax from clojure, right?

  2. (defun :-] (<) (= < 2))

    Mostly lost here. Defining a function called :-] that takes an argument …

lisp lambda common-lisp

1
推荐指数
1
解决办法
370
查看次数

什么类型的名称对Ruby方法合法?

本文中,它使用以下方法.

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方法名中使用或使用其他非字母表吗?

ruby methods

1
推荐指数
1
解决办法
184
查看次数

标签 统计

common-lisp ×1

lambda ×1

lisp ×1

methods ×1

ruby ×1