Kho tháng 1/2020

Thứ năm, 30 Tháng 1 năm 2020 20:45:08 ICT

Scheme "restart safe"

From shirok

Oh that's an obscure jargon among some Schemers. Suppose you say (string-map proc ...) and proc captures a continuation. After returning string-map, the continuation may be invoked again. The second return of string-map shouldn't alter the first return value. You have to go purely functional, so probably output should be constructed as a list and list->string-ed.

And from r7rs spec, the string-map section:

If multiple returns occur from string-map, the values returned by earlier returns are not mutated.


Tác giả: pclouds | Liên kết tĩnh