hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

yield! without #light?

Last post 07-14-2008, 12:40 by dsyme. 1 replies.
Sort Posts: Previous Next
  •  07-14-2008, 8:45 6383

    yield! without #light?

    I try to create sequence with recursive yield, but without any success.
    I found sample, that works only with #light switch

        #light
        let rec digits (x: int) =
            seq {
                match x with
                | _ when x < 10 -> yield x
                | _ -> yield x % 10
                       yield! digits(x / 10)
            }

    Please, can someone show, how to rewrite this sample without #light mode?

    B.R.
    Pavel
  •  07-14-2008, 12:40 6388 in reply to 6383

    Re: yield! without #light?

    This is a known issue with sequence expressions in 1.9.4 - you need to use #light to use multiple yields. This issue will be addressed in our CTP bits.

    Thanks
    Don

     

     

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems