urlpatterns = patterns('',
(r'^articles/(?P<year>\d{4})/$', views.year_archive),
(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', views.month_archive),
)
static mappings = {
"/articles/$year/" (view:'year_archive') {
constraints { year(matches:/\d{4}/) }
}
"/articles/$year/$month" (view:'month_archive') {
constraints {
year(matches:/\d{4}/)
month(matches:/\d{2}/)
}
}
}
(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', views.month_archive)
"/articles/$year/$month" (view:'month_archive') {
constraints {
year(matches:/\d{4}/)
month(matches:/\d{2}/)
}
}
native implementations return aNodeList
rather than anArray
.
function f(a,b,c) {...}; var f1 = f.curry(x);
/* f1(b,c) -> f(x,b,c) */
var f2 = f.partial(_, x);
/* f2(a, c) -> f(a, x, c) */
var f2 = f.partial(_, _, x);
/* f2(a, b) -> f(a, b, x) */