Skip to content

Validating breakpoint location... when editing a line that has a Breakpoint in F # #12005

@KevinRansom

Description

@KevinRansom

Copied from VSFeedback

// Learn more about F# at http://docs.microsoft.com/dotnet/fsharp

open System

/// Decodes a Roman Number string to a int number // https://twitter.com/nikoloz_p/status/1421218836896960515
let DecodeRomanNumeral RomanNumeral =
    let DigitToNumber = function
    | 'I' -> 1
    | 'V' -> 5
    | 'X' -> 10
    | 'L' -> 50
    | 'C' -> 100
    | 'D' -> 500
    | 'M' -> 1000
    | c -> failwith (sprintf "Invalid digit %c" c)

let rec sum' Numbers = 
        match Numbers with
        | [] ->0
        | x::y::rest when x < y -> y - x + sum' rest
        | x::rest -> x + sum' rest
    
RomanNumeral 
        |> Seq.map DigitToNumber
        |> Seq.toList
        |> sum'

[<EntryPoint>]
let main argv =
    let message = DecodeRomanNumeral "XVXV"  
    printfn "Hello world %i" message
    0

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Debugstepping, debug points, stacks and more

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions