[racket] TR Numeric Tower

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Feb 13 22:04:55 EST 2013

#lang typed/racket

(: S->F : String -> (Option Float))
(define (S->F s)
  (define n (string->number s))
  (and (flonum? n) n))

I assume you mean to convert strings into floats, if possible. 

But you may like the funny answers better -- Matthias

On Feb 13, 2013, at 9:49 PM, Ray Racine wrote:

> What is the most efficient way to write the following method in TR?
> (: S->F (String -> (Option Float)))
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Posted on the users mailing list.