Post History
Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;
Answer
Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;