Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Nov 21, 2022
1 parent e5e769a commit b69faba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ module Continuation =

type Continuations = ((FileContentEntry list -> FileContentEntry list) -> FileContentEntry list) list

/// Option.toList >> (List.collect f)
let cfo f a = lc f (Option.toList a)
/// List.collect
let lc = List.collect

let identToPath (ident: Ident) = ident.idText

let longIdentToPath (skipLast: bool) (longId: LongIdent) : ModuleSegment list =
if skipLast then
List.take (longId.Length - 1) longId
else
longId
|> List.map identToPath
|> List.map (fun ident -> ident.idText)

let synLongIdentToPath (skipLast: bool) (synLongIdent: SynLongIdent) =
longIdentToPath skipLast synLongIdent.LongIdent
Expand Down

0 comments on commit b69faba

Please sign in to comment.