Deutsch   English   Français   Italiano  
<v29p14$2mr5l$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna <HenHanna@devnull.tb>
Newsgroups: comp.lang.lisp
Subject: Given string 'a.bc.' -- replace each dot(.) with 0 or 1
Date: Sat, 18 May 2024 01:31:32 -0700
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <v29p14$2mr5l$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 18 May 2024 10:31:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7c7ccf8d8ecc9b5171c5fa73857bd316";
	logging-data="2845877"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+78RDE4Z5X7K1RhbvBfWwFsSoXlYT1IBo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xlJ7WU6mg0s1nIK2ZmI1l4mK7E0=
Content-Language: en-US
Bytes: 1426


How can i write this function simply?   (in Common Lisp)

-- Given a string  'a.bc.'   -- replace each dot(.)  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, e.g.   (a $ b c $)  rather than  'a.bc.'