Welcome to the CHICKEN Scheme pasting service

CamelCase->hyphons pasted by certainty on Fri May 18 11:08:00 2012

(define-for-syntax (hyphonize identifier)
   (let ((parts (irregex-extract "[A-Z][^A-Z]+" identifier)))
     (string-join (map string-downcase (if (null? parts) (list identifier) parts)) "-")))

shorter version added by certainty on Fri May 18 11:10:40 2012

(define-for-syntax (hyphonize identifier)
  (string-join (map string-downcase (irregex-extract "[A-Z][^A-Z]*" identifier)) "-"))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `get-environment-variable'?
Visually impaired? Let me spell it for you (wav file) download WAV