Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new slice syntax #691

Closed
nojaf opened this issue Feb 18, 2020 · 0 comments · Fixed by #692
Closed

Support new slice syntax #691

nojaf opened this issue Feb 18, 2020 · 0 comments · Fixed by #692

Comments

@nojaf
Copy link
Contributor

nojaf commented Feb 18, 2020

Issue created from fantomas-ui

Support https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1076-from-the-end-slicing.md

Code

let a = list.[..^0]   // 1,2,3,4,5
let b = list.[..^1]   // 1,2,3,4
let c = list.[0..^1]  // 1,2,3,4
let d = list.[^1..]   // 4,5
let e = list.[^0..]   // 5
let f = list.[^2..^1] // 3,4

Result

let a = list.[..0] // 1,2,3,4,5
let b = list.[..1] // 1,2,3,4
let c = list.[0..1] // 1,2,3,4
let d = list.[1..] // 4,5
let e = list.[0..] // 5
let f = list.[2..1] // 3,4

Options

Fantomas Next - 3.2.0-2/10/2020

Name Value
IndentOnTryWith false
IndentSpaceNum 4
KeepNewlineAfter false
MaxIfThenElseShortWidth 40
PageWidth 120
ReorderOpenDeclaration false
SemicolonAtEndOfLine false
SpaceAfterComma true
SpaceAfterSemicolon true
SpaceAroundDelimiter true
SpaceBeforeArgument true
SpaceBeforeColon false
StrictMode false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant