HenHanna
2024-05-18 08:28:37 UTC
How can i write this function simply? (in Scheme (Gauche))
-- Given a string 'a.bc.' -- each dot(.) is to be replaced with 0 or 1.
-- So the value is a list of 4 strings:
['a0bc0', 'a0bc1', 'a1bc0', 'a1bc1']
-- The order is not important.
If the string has 3 dots, the value is a list of length 8.
If the program is going to be simpler,
pls use, say, (a $ b c $) rather than 'a.bc.'
-- Given a string 'a.bc.' -- each dot(.) is to be replaced with 0 or 1.
-- So the value is a list of 4 strings:
['a0bc0', 'a0bc1', 'a1bc0', 'a1bc1']
-- The order is not important.
If the string has 3 dots, the value is a list of length 8.
If the program is going to be simpler,
pls use, say, (a $ b c $) rather than 'a.bc.'