Lemmings.world
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
blueberry@feddit.orgM to AI Detox@feddit.orgEnglish ·
edit-2
23 days ago

99 Haskell Problems - Problem 2

message-square
message-square
0
link
fedilink
1
message-square

99 Haskell Problems - Problem 2

blueberry@feddit.orgM to AI Detox@feddit.orgEnglish ·
edit-2
23 days ago
message-square
0
link
fedilink

Problem 2

(*) Find the last-but-one (or second-last) element of a list.

(Note that the Lisp transcription of this problem is incorrect.)

Example in Haskell:

myButLast [1,2,3,4]

3

myButLast [‘a’…‘z’]

‘y’

Source: https://wiki.haskell.org/index.php?title=99_questions%2F1_to_10

alert-triangle
You must log in or register to comment.

AI Detox@feddit.org

ai_detox@feddit.org

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !ai_detox@feddit.org

Verifiable tasks, exercises and puzzles. Non-passively consumable pieces of knowledge. Creativity-games and analogue physical tasks. Summed up: everything that gives your brain something to do without AI.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 3 users / day
  • 3 users / week
  • 19 users / month
  • 19 users / 6 months
  • 1 local subscriber
  • 58 subscribers
  • 8 Posts
  • 6 Comments
  • Modlog
  • mods:
  • blueberry@feddit.org
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org