Index: src/builtins/any-str.pir
===================================================================
--- src/builtins/any-str.pir	(revision 32421)
+++ src/builtins/any-str.pir	(working copy)
@@ -191,6 +191,23 @@ scalar .fmt
     .return ($P0)
 .end
 
+=item fmt
+    
+ our Str multi Any::fmt ( Str $format )
+    
+Returns the invocant formatted by an implicit call to sprintf.
+
+=cut
+
+.sub 'fmt' :method :multi(_)
+    .param string format
+    .local pmc retv
+
+    retv = 'sprintf'(format, self)
+
+    .return(retv)
+.end 
+
 =item index()
 
 =cut
Index: src/classes/Mapping.pir
===================================================================
--- src/classes/Mapping.pir	(revision 32421)
+++ src/classes/Mapping.pir	(working copy)
@@ -137,6 +137,51 @@ mapping .fmt
 .end
 
 
+=item fmt
+    
+ our Str multi Mapping::fmt ( Str $format, $separator = "\n" )
+    
+Returns the invocant mapping formatted by an implicit call to sprintf on
+the key and value of every pair, joined by newlines or an explicitly given
+separator.
+    
+=cut
+
+.sub 'fmt' :method :multi('Hash')
+    .param pmc format
+    .param string sep          :optional
+    .param int has_sep         :opt_flag
+
+    .local pmc pairs
+    .local pmc res
+    .local pmc iter
+    .local pmc retv
+    .local pmc elem
+    .local pmc key
+    .local pmc value
+    .local pmc elemres
+
+    if has_sep goto have_sep
+    sep = "\n"
+  have_sep:
+    pairs = self.'pairs'()
+    res = new 'List'
+    iter = pairs.'iterator'()
+  elem_loop:
+    unless iter goto done
+
+  invoke:
+    elem = shift iter
+    elemres = elem.'fmt'(format)
+    push res, elemres
+    goto elem_loop
+  
+  done:
+    retv = 'join'(sep, res)
+    .return(retv)
+.end
+
+
 .sub 'keys' :method :multi('Hash')
     .local pmc iter
     .local pmc rv
Index: src/classes/Pair.pir
===================================================================
--- src/classes/Pair.pir	(revision 32421)
+++ src/classes/Pair.pir	(working copy)
@@ -75,6 +75,29 @@ pair .fmt
 .end
 
 
+=item fmt
+
+ our Str multi Pair::fmt ( Str $format )
+
+Returns the invocant pair formatted by an implicit call to sprintf on
+the key and value.
+
+=cut
+
+.sub 'fmt' :method
+    .param pmc format
+
+    .local pmc retv
+    .local pmc key
+    .local pmc value
+
+    key = self.'key'()
+    value = self.'value'()
+    retv = 'sprintf'(format, key, value)
+
+    .return(retv)
+.end
+
 =item perl
 
 Returns a Perl code representation of the pair.
Index: src/classes/List.pir
===================================================================
--- src/classes/List.pir	(revision 32421)
+++ src/classes/List.pir	(working copy)
@@ -270,7 +270,45 @@ list .fmt
     .return values.'first'(test)
 .end
 
+=item fmt
 
+ our Str multi List::fmt ( Str $format, $separator = ' ' )
+
+Returns the invocant list formatted by an implicit call to sprintf on each
+of the elements, then joined with spaces or an explicitly given separator.
+    
+=cut
+
+.sub 'fmt' :method :multi('ResizablePMCArray')
+    .param pmc format
+    .param string sep          :optional
+    .param int has_sep         :opt_flag
+
+    .local pmc res
+    .local pmc iter
+    .local pmc retv
+    .local pmc elem
+    .local pmc elemres
+
+    if has_sep goto have_sep
+    sep = ' '
+  have_sep:
+    res = new 'List'
+    iter = self.'iterator'()
+  elem_loop:
+    unless iter goto done
+
+  invoke:
+    elem = shift iter
+    elemres = 'sprintf'(format, elem)
+    push res, elemres
+    goto elem_loop
+
+  done:
+    retv = 'join'(sep, res)
+    .return(retv)
+.end
+
 =item grep(...)
 
 =cut
