Re: Palindromes and pattern matching

2012-09-18 Thread Ian Price
Panicz Maciej Godek writes: > I don't know whether the Scheme's pattern matcher > has any notation for getting the last element of a list. > At first, I thought that maybe it could be done using > the unquote-splicing operator, so the equivalent code > would look like this: > (define (palindrome?

Palindromes and pattern matching

2012-09-18 Thread Panicz Maciej Godek
Howdie, I've been learning the refal language recently (http://refal.botik.ru/book/html/ ) and I've been wondering, if there's any way to simulate the behaviour of the refal's pattern matcher using the Andrew K. Wright's/Alex Shinn's pattern matcher for Scheme. Namely, the Refal tutorial presents a