Skip to content

Instantly share code, notes, and snippets.

View massif.out.25
This file has been truncated, but you can view the full file.
--------------------------------------------------------------------------------
Command: php vendor/phpunit/phpunit/phpunit
Massif arguments: (none)
ms_print arguments: massif.out.25
--------------------------------------------------------------------------------
GB
7.190^ #
View past_papers_scheme.scm
;Any arbitrary list s can be transformed into a key-list by transforming each item in s
;into a key-element (choosing appropriate keys in the process).
;Write a function (make-key-list s) that returns a key-list based on its list argument s.
;2009 Paper
(define (m-k-l s)
(define (m-k-l-tr s id)
(if (null? s) '()
(cons(cons id (list (car s)))(m-k-l-tr (cdr s) (add1 id)))))
(m-k-l-tr s 1))