How do you represent vector elements that are functions / procedures in a racket?
I would think it would be something like:
#(+ -)
But when I retrieve the elements, I get the characters '+ and' -.
The reason is because it #(is a special syntax for reading array literals, and not an operator that evaluates the contents between parentheses. From the manual:
#(
#(, #[ #{, vector; . Vectors .... - read-syntax, , .: #(1 apple 3) (vector 1 'apple 3)
#(, #[ #{, vector; . Vectors .... - read-syntax, , .
#[
#{
: #(1 apple 3) (vector 1 'apple 3)
#(1 apple 3)
(vector 1 'apple 3)
, vector:
vector
(define a (vector + -)) ((vector-ref a 0) 2 3) ; => 5
Source: https://habr.com/ru/post/1624908/More articles:TinyMCE Nested User Formats - javascriptStatic local variable in C ++ 11? - c ++Ruby Keyword Case Currying - ruby | fooobar.comhow to make ATP sections as I posted here - rHow can I see the effect of sklearn.preprocessing.PolynomialFeatures? - pythonHow to draw a circle in PCoA results? - rТип не такой полиморфный, как предлагается - fregeBoost.Asio - named pipe poll - c ++Как отобразить строку из результата действия - c#Limit system calls inside a docker container - dockerAll Articles