开发者

some function applied with ratio never returns

开发者 https://www.devze.com 2023-04-12 19:13 出处:网络
can some on开发者_开发百科e please explain why (some #(= 3 %) (range)) returns true but (some #(= 4/3 %) (range))

can some on开发者_开发百科e please explain why

(some #(= 3 %) (range))

returns true but

(some #(= 4/3 %) (range)) 

never returns?


(range) produces an infinite sequence, so it'll just keep looking until it finds a natural number which is equal to 4/3, which isn't terribly likely.

0

精彩评论

暂无评论...
验证码 换一张
取 消