Gauche > Archives > 2016/05/25

2016/05/25 10:35:37 UTCshiro
#
Schemeの極座標リテラル、偏角が0以外はぴったりにならないのでいまいち使いにくい。ふと思いついてこんなふうにしてみた。
#
gosh> 2@1pi
-2.0
gosh> 2@10pi
2.0
gosh> 2@0.5pi
0.0+2.0i
gosh> 2@1.5pi
0.0-2.0i
gosh> 2@3.14159265358979323
-2.0+2.4492935982947064e-16i
2016/05/25 18:00:34 UTCkaki
#
gosh> '(#: #:#: #:))
(#:| | #:|#:| #:|)|)
#
唐突で恐縮なんですが、この1文字は問答無用で読む挙動は仕様ですか?#!reader-directive も似たような挙動をします。
#
gosh> #! foo 42
WARNING: Ignoring unrecognized hash-bang directive: #!| foo|
42