1 people like it.

Palindrome

Palindrome test.

1: 
let inline palindrome l = List.rev l = l
val palindrome : l:'a list -> bool (requires equality)

Full name: Script.palindrome
val l : 'a list (requires equality)
Multiple items
module List

from Microsoft.FSharp.Collections

--------------------
type List<'T> =
  | ( [] )
  | ( :: ) of Head: 'T * Tail: 'T list
  interface IEnumerable
  interface IEnumerable<'T>
  member Head : 'T
  member IsEmpty : bool
  member Item : index:int -> 'T with get
  member Length : int
  member Tail : 'T list
  static member Cons : head:'T * tail:'T list -> 'T list
  static member Empty : 'T list

Full name: Microsoft.FSharp.Collections.List<_>
val rev : list:'T list -> 'T list

Full name: Microsoft.FSharp.Collections.List.rev

More information

Link:http://fssnip.net/qQ
Posted:4 years ago
Author:Pitch Rock
Tags: palindrome