Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7432143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:24:36+00:00 2026-05-29T09:24:36+00:00

Consider the following SML function: fn x => x x This produces the following

  • 0

Consider the following SML function:

fn x => x x

This produces the following error (Standard ML of New Jersey v110.72):

stdIn:1.9-1.12 Error: operator is not a function [circularity]
  operator: 'Z
  in expression:
    x x

I can sort of see why this isn’t allowed — for one, I’m not really sure how to write down what its type would be — but it’s not completely nonsensical; for instance, I could pass the identity function to it and get it back.

Is there a name for this function? (Is there a way to express it in SML?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:24:37+00:00Added an answer on May 29, 2026 at 9:24 am

    There is no way to express this function in a language with an ML-like type system. Even with the identity function it wouldn’t work, because the first x and the second in x x would have to be different instances of that function, of type (_a -> _a) -> (_a -> _a) and _a -> _a, respectively, for some type _a.

    In fact, type systems are designed to forbid constructs like

    (λx . x x) (λx . x x)
    

    in the untyped lambda calculus. In the dynamically typed language Scheme, you can write this function:

    (define (apply-to-self x) (x x))
    

    and get the expected result

    > (define (id x) x)
    > (eq? (apply-to-self id) id)
    #t
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following 2 queries: select tblA.a,tblA.b,tblA.c,tblA.d from tblA where tblA.a not in (select
Please consider following schema CREATE table articles ( id Int UNSIGNED NOT NULL AUTO_INCREMENT,
Consider following: Partial View: <%= Html.ListBox(BlackList, Model.Select( x => new SelectListItem { Text =
Consider following JavaScript code (tested in Firefox): function f(a) { if (a == undefined)
Consider following code: ArrayList<Integer> aList = new ArrayList<Integer>(); aList.add(2134); aList.add(3423); aList.add(4234); aList.add(343); String tmpString
Consider following code: typedef SomeType type_t[2]; SomeType * arr1 = new type_t; //new or
Consider following function definition in ghci. let myF = sin . cos . sum
Lets consider following two codes First: for (int i=0;i<10000000;i++) { char* tab = new
consider following scenario input string = WIPR.NS i have to replace this with WIPR2.NS
Consider following script (it's total nonsense in pseudo-language): if (Request.hostMatch(asfasfasf.com) && someString.existsIn(new String[] {brr,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.