Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scheme/DrRacket

Name: Anonymous 2013-01-10 13:28

How do I write a function that takes any integers in a list and produces the number of values in the list whose one's digit (i.e. the least significant or rightmost digit) is 1. For example,
(ones (list 82 231 1 22 1000)) => 2?

Name: Anonymous 2013-01-10 13:58

>>6

Lisp   | Haskell
-------|------------------------------------------------------------------------
lambda | inference, lambda cube, strongly normalizing, equality-qualified types,
       | algebraic types, existential types, phantom types, dependent types,
       | higher-kinded types, linear types, inductive types, unique types,
       | nominal types, recursive types, type classes, bounded quantification,
       | type annotations, principal types, higher-order abstract syntax,
       | generalized algebraic types, robinson unification, hindley-milner,
       | constrained types, polymorphic recursion, parametric polymorphism,
       | equivalence classes, type order, judgments, curry-howard isomorphism,
       | system t, system f, products, coproducts, categorial sum, call-by-name,
       | inhabited types, higher-rank impredicative polymorphism, covariance,
       | subtype polymorphism, ad-hoc polymorphism, predicative types,
       | signatures types, contravariance, affine types, structural subtyping...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List